<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output method="xml" omit-xml-declaration="yes"/>


<xsl:template name="index-1-style-and-script">

<!--*****************These are system variables	the skin uses....do not	change these***************-->
<xsl:variable name="file-container"><xsl:call-template name="substring-after-last"><xsl:with-param name="string" select="files/file[1]/fileURL"	/><xsl:with-param name="delimiter" select="'.'"	/></xsl:call-template></xsl:variable>
<xsl:variable name="short-plot"><xsl:call-template name="substring-before-last"><xsl:with-param	name="string" select="plot" /><xsl:with-param name="delimiter" select="'.'" /></xsl:call-template></xsl:variable>
<xsl:variable name="plot"><xsl:value-of	select="plot"/></xsl:variable>
<xsl:variable name="typeA"><xsl:call-template name="substring-after-last"><xsl:with-param name="string"	select="files/file[1]/fileURL" /><xsl:with-param name="delimiter" select="'file:///opt/sybhttpd/localhost.drives/'" /></xsl:call-template></xsl:variable>
<xsl:variable name="typeB"><xsl:call-template name="plot"><xsl:with-param name="string"	select="$typeA"	/><xsl:with-param name="delimiter" select="'/'"	/></xsl:call-template></xsl:variable>
<xsl:variable name="fileplace"><xsl:call-template name="substring-after-last"><xsl:with-param name="string" select="files/file[1]/fileURL" /><xsl:with-param name="delimiter" select="'file:///opt/sybhttpd/localhost.drives/'"	/></xsl:call-template></xsl:variable>

<!--********************End of system variables*****************************-->


<style>
#navtable {visibility:hidden;}
#navimage {visibility:hidden; position:absolute; top:1; left:57;}
#navlinks {visibility:hidden;}
#Titles {font-size:18pt;color:#AAAAAA;}
#imagebkgd {position:absolute; top:0; left:50;visibility:visible;}


	<xsl:choose>
		<xsl:when test="count(library/movies/movie[@isExtra!='true']) > 8">
			#one {visibility:visible;position:absolute; top:400; left:30;}
		</xsl:when>
		<xsl:otherwise>
			#one {visibility:hidden;position:absolute; top:400; left:30;}
		</xsl:otherwise>
	</xsl:choose>

	<xsl:choose>
		<xsl:when test="count(library/movies/movie[@isExtra!='true']) > 7">
			#two {visibility:visible;position:absolute; top:400; left:150;}
		</xsl:when>
		<xsl:otherwise>
			#two {visibility:hidden;position:absolute; top:400; left:150;}
		</xsl:otherwise>
	</xsl:choose>

	<xsl:choose>
		<xsl:when test="count(library/movies/movie[@isExtra!='true']) > 6">
			#three {visibility:visible;position:absolute; top:400; left:270;}
		</xsl:when>
		<xsl:otherwise>
			#three {visibility:hidden;position:absolute; top:400; left:270;}
		</xsl:otherwise>
	</xsl:choose>

	<xsl:choose>
		<xsl:when test="count(library/movies/movie[@isExtra!='true']) > 5">
			#four {visibility:visible;position:absolute; top:400; left:390;}
		</xsl:when>
		<xsl:otherwise>
			#four {visibility:hidden;position:absolute; top:400; left:390;}
		</xsl:otherwise>
	</xsl:choose>

#five {visibility:visible;position:absolute; top:362; left:480;}

	<xsl:choose>
		<xsl:when test="count(library/movies/movie[@isExtra!='true']) > 1">
			#six {visibility:visible;position:absolute; top:400; left:600;}
		</xsl:when>
		<xsl:otherwise>
			#six {visibility:hidden;position:absolute; top:400; left:600;}
		</xsl:otherwise>
	</xsl:choose>

	<xsl:choose>
		<xsl:when test="count(library/movies/movie[@isExtra!='true']) > 2">
			#seven {visibility:visible;position:absolute; top:400; left:720;}
		</xsl:when>
		<xsl:otherwise>
			#seven {visibility:hidden;position:absolute; top:400; left:720;}
		</xsl:otherwise>
	</xsl:choose>

	<xsl:choose>
		<xsl:when test="count(library/movies/movie[@isExtra!='true']) > 3">
			#eight {visibility:visible;position:absolute; top:400; left:840;}
		</xsl:when>
		<xsl:otherwise>
			#eight {visibility:hidden;position:absolute; top:400; left:840;}
		</xsl:otherwise>
	</xsl:choose>

	<xsl:choose>
		<xsl:when test="count(library/movies/movie[@isExtra!='true']) > 4">
			#nine {visibility:visible;position:absolute; top:400; left:960;}
		</xsl:when>
		<xsl:otherwise>
			#nine {visibility:hidden;position:absolute; top:400; left:960;}
		</xsl:otherwise>
	</xsl:choose>

#imagecopy {visibility:hidden;position:absolute; top:400; left:495;}
#imageright {visibility:hidden;position:absolute; top:400; left:1000;}
#imageleft {visibility:hidden;position:absolute; top:400; left:1;}
#frames {visibility:visible;position:absolute; top:0; left:50;}
#coverframe {visibility:visible;position:absolute; top:309; left:3;}
#coverbkgnd {visibility:visible;position:absolute; top:325; left:3;}
#coverbkgnd2 {visibility:hidden;position:absolute; top:362; left:480;}
</style>

<style>
#list1 {position:absolute;left:400;top:50;visibility:hidden;}
#list2 {position:absolute;left:400;top:100;visibility:hidden;}
#list3 {position:absolute;left:400;top:150;visibility:hidden;}
#list4 {position:absolute;left:400;top:200;visibility:hidden;}
#list5 {position:absolute;left:400;top:250;visibility:hidden;font-size:20pt;}
#list6 {position:absolute;left:400;top:300;visibility:hidden;}
#list7 {position:absolute;left:400;top:350;visibility:hidden;}
#list8 {position:absolute;left:400;top:400;visibility:hidden;}
#list9 {position:absolute;left:400;top:450;visibility:hidden;}
#list10 {position:absolute;left:400;top:500;visibility:hidden;}
#listimage {position:absolute;left:150;top:150;visibility:hidden;}
</style>

<title>MovieJukebox</title>
<script type="text/javascript" src="pictures/passit.js">&#160;</script>

<xsl:for-each select="library/movies/movie[@isExtra!='true']">
<script>
	var movie<xsl:value-of select="position()-1"/>= new Array();

	movie<xsl:value-of select="position()-1"/>['title']="<xsl:value-of select="translate(title,'&#58;', &quot;-&quot;)" disable-output-escaping="yes"/><xsl:if test="season != -1"> - Season <xsl:value-of select="season" /></xsl:if>"
	movie<xsl:value-of select="position()-1"/>['basefilename']="<xsl:value-of select="baseFilename"/>"
	movie<xsl:value-of select="position()-1"/>['thumbnail']="<xsl:value-of select="thumbnail"/>"
	movie<xsl:value-of select="position()-1"/>['fanart']="<xsl:value-of select="fanartFile"/>"
	movie<xsl:value-of select="position()-1"/>['file']="<xsl:choose><xsl:when test="count(files/file) > 1"><xsl:value-of select="baseFilename"/>.playlist.jsp</xsl:when><xsl:otherwise><xsl:call-template name="substring-after-last"><xsl:with-param name="string" select="files/file[1]/fileURL" /><xsl:with-param name="delimiter" select="'file:///opt/sybhttpd/localhost.drives/'" /></xsl:call-template></xsl:otherwise></xsl:choose>"
	movie<xsl:value-of select="position()-1"/>['type']="<xsl:choose><xsl:when test="count(files/file) > 1">playlist</xsl:when><xsl:when test="container='DVD Video' or container='dvd video'">zcd</xsl:when><xsl:when test="container = 'ISO' or ends-with(files/file[1]/fileURL, '.ISO') or ends-with(files/file[1]/fileURL, '.iso')">zcd</xsl:when><xsl:when test="container = 'IMG' or ends-with(files/file[1]/fileURL, '.IMG') or ends-with(files/file[1]/fileURL, '.img')">zcd</xsl:when><xsl:when test="ends-with(files/file[1]/fileURL, 'VIDEO_TS')">zcd</xsl:when><xsl:when test="ends-with(files/file[1]/fileURL, '/')">zcd</xsl:when><xsl:otherwise>vod</xsl:otherwise></xsl:choose>"
	movie<xsl:value-of select="position()-1"/>['Vicons']="<xsl:call-template name="videoOutputIndex2"></xsl:call-template>"
	movie<xsl:value-of select="position()-1"/>['Aicons']="<xsl:call-template name="audioCodecIndex2"></xsl:call-template>"
	movie<xsl:value-of select="position()-1"/>['Ricons']="<xsl:call-template name="certificationIndex2"></xsl:call-template>"
	movie<xsl:value-of select="position()-1"/>['Sicons']=<xsl:choose><xsl:when test ="//movies/movie/season ='-1'">"<xsl:call-template name="studioIndex2"></xsl:call-template>"</xsl:when><xsl:otherwise>"<xsl:call-template name="networkIndex2"></xsl:call-template>"</xsl:otherwise></xsl:choose>
</script>
</xsl:for-each>

<script>
	var movie= new Array();
</script>
		<xsl:for-each select="library/movies/movie[@isExtra!='true']">
		<script>
			movie[<xsl:value-of select="position()-1"/>]=movie<xsl:value-of select="position()-1"/>;
		</script>
		</xsl:for-each>


<!--  code not done yet

<script>

var genreAll=[movie];

</script>

			<script>
				var genreHD= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='HD'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var genreTVShows= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='TV shows'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var genreMovies= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='Movies'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var genreExtras= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='Extras'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var genreNew= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='New'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var genreTop250= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='Top250'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var genreHD720= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='HD-720'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var genreHD1080= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='HD-1080'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>

			<script>
				var ThisYear= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='This Year'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var LastYear= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='Last Year'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var year2000= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='2000'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var year1990= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='1990'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var year1980= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='1980'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var year1970= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='1970'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var year1960= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='1960'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var year1950= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='1950'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var year1940= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='1940'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var year1930= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='1930'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var year1920= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='1920'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var ratedR= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Certification']='R'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var ratedPG13= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Certification']='PG-13'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var ratedPG= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Certification']='PG'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var ratedG= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Certification']='G'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var ratedNotRated= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Certification']='Not Rated'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var title09= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='09'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleA= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='A'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleB= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='B'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleC= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='C'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleD= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='D'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleE= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='E'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleF= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='09'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleG= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='G'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleH= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='H'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleI= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='I'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleJ= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='J'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleK= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='K'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleL= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='L'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleM= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='M'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleN= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='N'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleO= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='O'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleP= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='P'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleQ= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='Q'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleR= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='R'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleS= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='S'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleT= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='T'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleU= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='U'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleV= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='V'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleW= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='W'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleX= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='X'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleY= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='Y'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
			<script>
				var titleZ= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index[@type='Title']='Z'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>


				<script>
					var genreAction= [
						<xsl:for-each select="library/movies/movie[@isExtra!='true']">
							<xsl:if test="indexes/index='Action'">
								movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
							</xsl:if>
						</xsl:for-each>
						]
				</script>

		
			<script>
				var genreAnimation= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='Animation'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
		
			<script>
				var genreComedy= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='Comedy'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
	
			<script>
				var genreDocumentary= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='Documentary'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
		
			<script>
				var genreDrama= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='Drama'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
		
			<script>
				var genreFantasy= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='Fantasy'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
		
			<script>
				var genreOther= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='Other'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
		
			<script>
				var genreSciFi= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='Sci-Fi'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
		
			<script>
				var genreThriller= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='Thriller'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
		
			<script>
				var genreReality= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='Reality'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
		
			<script>
				var genreHorror= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='Horror'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
		
			<script>
				var genreFamily= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='Family'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>
		

			<script>
				var genreMusic= [
					<xsl:for-each select="library/movies/movie[@isExtra!='true']">
						<xsl:if test="indexes/index='Music'">
							movie<xsl:value-of select="position()-1"/><xsl:if test="position() != last()">,</xsl:if>
						</xsl:if>
					</xsl:for-each>
					]
			</script>

End of unfinished code -->


<script>
var yon=0;
var searching=1;
var searchlist=0;
var input=0;
var yon=0;
var titlelow=0;
var inputlow=0;
var yonda=0;


<!--######old code, just for reference    if( titlelow.substring(0,lengthtest)==input.substring(0,lengthtest) )#########-->

function excalSearchThis()
	{
		yon=yon;

		if (searching==1)
		  {
			var I=0;
			input= prompt("Enter Search Word","")
			searchlist= new Array();

			var lengthtest=input.length;
			
			if (lengthtest==1)
				{
					for(I=0;I <xsl:value-of select="'&lt;'" disable-output-escaping="yes"/> movie.length; I++)
						{
							titlelow= movie[I]['title'].toLowerCase();
							inputlow= input.toLowerCase();
					
							if (titlelow.substring(0,3)=="the")
								{
									if( titlelow.substring(4,5)==input.substring(0,1))
										{
											searchlist[searchlist.length] = movie[I]
										}
								}
							else
								{
									if( titlelow.substring(0,1)==input.substring(0,1) )
										{
											searchlist[searchlist.length] = movie[I]
										}
								}
						}
				}

			else
				{
		    
					for(I=0;I <xsl:value-of select="'&lt;'" disable-output-escaping="yes"/> movie.length; I++)
						{
							titlelow= movie[I]['title'].toLowerCase();
							inputlow= input.toLowerCase();

							if( titlelow.match(inputlow) )
								{
									searchlist[searchlist.length] = movie[I]
								}
						}

				}
				 yon=0;
				searching=0;

				moviechange4(yon)
		  
			}
		else
			{
				searching=1;
				yonda = findSearch( movie, searchlist[(yon + searchlist.length) % searchlist.length]['title'])

				moviechange4(yonda)

			}

		}

</script>




<script>

var ratingsys= new Array();

	ratingsys['G']=1;
	ratingsys['PG']=10;
	ratingsys['PG-13']=13;
	ratingsys['R']=18;
	ratingsys['NC-17']=17;
	ratingsys['Not Rated']=18;

	ratingsys['TV-Y']=1;
	ratingsys['TV-Y7']=8;
	ratingsys['TV-G']=10;
	ratingsys['TV-PG']=13;
	ratingsys['TV-14']=15;
	ratingsys['TV-MA']=16;

	ratingsys['U']=1;
	ratingsys['PG']=10;
	ratingsys['12']=12;
	ratingsys['12A']=13;
	ratingsys['15']=15;
	ratingsys['18']=18;
	ratingsys['R18']=99;

	ratingsys['X']=99;
	ratingsys['XX']=99;
	ratingsys['XXX']=99;

var ratingnow=0;
var switchTime=0;
var testmove=0;
var yonsa=0;
var list=0;
var sorting=movie;
</script>

<xsl:if test="$use-sliding='true'">
<script>



function moviechange(y)

{


	if (list==1)
		{
			var glen = movie.length
			var ending = glen - 1
			var last = ending - 1

			if (yon+y<xsl:value-of select="'&lt;'" disable-output-escaping="yes"/>0)
				{
					yon=ending
				}
			else if (yon+y<xsl:value-of select="'&gt;'" disable-output-escaping="yes"/>ending)
				{
					yon=0
				}
			else
				{
					yon=yon+y
				}
			document.getElementById('list1').firstChild.nodeValue=movie[(yon -4 + movie.length) % movie.length]['title'];
			document.getElementById('list2').firstChild.nodeValue=movie[(yon -3 + movie.length) % movie.length]['title'];
			document.getElementById('list3').firstChild.nodeValue=movie[(yon -2 + movie.length) % movie.length]['title'];
			document.getElementById('list4').firstChild.nodeValue=movie[(yon -1 + movie.length) % movie.length]['title'];
			document.getElementById('list5').firstChild.nodeValue=movie[(yon + movie.length) % movie.length]['title'];
			document.getElementById('list6').firstChild.nodeValue=movie[(yon +1 + movie.length) % movie.length]['title'];
			document.getElementById('list7').firstChild.nodeValue=movie[(yon +2 + movie.length) % movie.length]['title'];
			document.getElementById('list8').firstChild.nodeValue=movie[(yon +3 + movie.length) % movie.length]['title'];
			document.getElementById('list9').firstChild.nodeValue=movie[(yon +4 + movie.length) % movie.length]['title'];
			document.getElementById('list10').firstChild.nodeValue=movie[(yon +5 + movie.length) % movie.length]['title'];

			document.getElementById('listimage').setAttribute('src', movie[(yon + movie.length) % movie.length]['thumbnail']);

			document.getElementById('list5').setAttribute('href', movie[(yon + movie.length) % movie.length]['basefilename']+".html");

		}

	else
		{
			yonsa=y
			document.styleSheets[1].cssRules[14].style.visibility='visible'
			document.getElementById('changeimage').setAttribute("src", "pictures/indexmaincoveroverlay.png");

			if (y ==1)
				{

					<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 4">
					if (searching==0)
						{
							if (searchlist.length <xsl:value-of select="'&lt;'" disable-output-escaping="yes"/> 4)
								{
									document.styleSheets[1].cssRules[15].style.visibility='hidden'
								}
						}
					else
						{
						document.styleSheets[1].cssRules[15].style.visibility='visible'
						}
					</xsl:if>

					document.styleSheets[1].cssRules[5].style.left='20'
					document.styleSheets[1].cssRules[6].style.left='110'
					document.styleSheets[1].cssRules[7].style.left='230'
					document.styleSheets[1].cssRules[8].style.left='350'
					document.styleSheets[1].cssRules[14].style.left='440'
					document.styleSheets[1].cssRules[10].style.left='560'
					document.styleSheets[1].cssRules[11].style.left='680'
					document.styleSheets[1].cssRules[12].style.left='800'
					document.styleSheets[1].cssRules[13].style.left='920'

					document.styleSheets[1].cssRules[15].style.left='1040'

					document.styleSheets[1].cssRules[10].style.top='390'

					document.getElementById('image6').setAttribute("width", "115");


					testmove = setTimeout("moviechange2("+yonsa+")", 1);
				}
			else if (y == -1)
				{
					<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 8">
					if (searching==0)
						{
							if (searchlist.length <xsl:value-of select="'&gt;'" disable-output-escaping="yes"/> 8)
								{
									document.styleSheets[1].cssRules[16].style.visibility='hidden'
								 }
						}
					else
						{
							document.styleSheets[1].cssRules[16].style.visibility='visible'
						}
							</xsl:if>

							document.styleSheets[1].cssRules[5].style.left='70'
							document.styleSheets[1].cssRules[6].style.left='190'
							document.styleSheets[1].cssRules[7].style.left='310'
							document.styleSheets[1].cssRules[8].style.left='410'
							document.styleSheets[1].cssRules[14].style.left='520'
							document.styleSheets[1].cssRules[10].style.left='640'
							document.styleSheets[1].cssRules[11].style.left='760'
							document.styleSheets[1].cssRules[12].style.left='880'
							document.styleSheets[1].cssRules[13].style.left='970'

							document.styleSheets[1].cssRules[16].style.left='1'

							document.styleSheets[1].cssRules[8].style.top='390'

							document.getElementById('image4').setAttribute("width", "115");

							testmove = setTimeout("moviechange2("+yonsa+")", 1);
						}
			else
				{
					moviechange4(yonsa)
				}
	}
}

function moviechange2(y)
	{
		yonsa=y

		if (y ==1)
			{
				document.styleSheets[1].cssRules[5].style.left='10'
				document.styleSheets[1].cssRules[6].style.left='70'
				document.styleSheets[1].cssRules[7].style.left='190'
				document.styleSheets[1].cssRules[8].style.left='310'
				document.styleSheets[1].cssRules[14].style.left='415'
				document.styleSheets[1].cssRules[10].style.left='520'
				document.styleSheets[1].cssRules[11].style.left='640'
				document.styleSheets[1].cssRules[12].style.left='760'
				document.styleSheets[1].cssRules[13].style.left='880'

				document.styleSheets[1].cssRules[15].style.left='1000'

				document.styleSheets[1].cssRules[10].style.top='381'

				document.getElementById('image6').setAttribute("width", "125");


				testmove = setTimeout("moviechange3("+yonsa+")", 1);
			}
		else if (y == -1)
			{
				document.styleSheets[1].cssRules[5].style.left='110'
				document.styleSheets[1].cssRules[6].style.left='230'
				document.styleSheets[1].cssRules[7].style.left='350'
				document.styleSheets[1].cssRules[8].style.left='450'
				document.styleSheets[1].cssRules[14].style.left='560'
				document.styleSheets[1].cssRules[10].style.left='680'
				document.styleSheets[1].cssRules[11].style.left='800'
				document.styleSheets[1].cssRules[12].style.left='920'
				document.styleSheets[1].cssRules[13].style.left='980'

				document.styleSheets[1].cssRules[16].style.left='10'

				document.styleSheets[1].cssRules[8].style.top='381'

				document.getElementById('image4').setAttribute("width", "125");


				testmove = setTimeout("moviechange3("+yonsa+")", 1);
			}
		else 
			{
				moviechange4(yonsa)
			}
	}

function moviechange3(y)
	{
		yonsa=y

		if (y == 1)
			{
				document.styleSheets[1].cssRules[5].style.left='5'
				document.styleSheets[1].cssRules[6].style.left='50'
				document.styleSheets[1].cssRules[7].style.left='170'
				document.styleSheets[1].cssRules[8].style.left='290'
				document.styleSheets[1].cssRules[14].style.left='400'
				document.styleSheets[1].cssRules[10].style.left='500'
				document.styleSheets[1].cssRules[11].style.left='620'
				document.styleSheets[1].cssRules[12].style.left='740'
				document.styleSheets[1].cssRules[13].style.left='860'

				document.styleSheets[1].cssRules[15].style.left='980'

				document.styleSheets[1].cssRules[10].style.top='372'

				document.getElementById('image6').setAttribute("width", "135");


				testmove = setTimeout("movietest("+yonsa+")", 1);
			}
		else if (y == -1)
			{
				document.styleSheets[1].cssRules[5].style.left='130'
				document.styleSheets[1].cssRules[6].style.left='250'
				document.styleSheets[1].cssRules[7].style.left='370'
				document.styleSheets[1].cssRules[8].style.left='470'
				document.styleSheets[1].cssRules[14].style.left='580'
				document.styleSheets[1].cssRules[10].style.left='700'
				document.styleSheets[1].cssRules[11].style.left='820'
				document.styleSheets[1].cssRules[12].style.left='940'
				document.styleSheets[1].cssRules[13].style.left='1000'

				document.styleSheets[1].cssRules[16].style.left='20'

				document.styleSheets[1].cssRules[8].style.top='372'

				document.getElementById('image4').setAttribute("width", "135");


				testmove = setTimeout("movietest("+yonsa+")", 1);
			}
		else 
			{
				moviechange4(yonsa)
			}
	}

function movietest(y)
	{

		yonsa=y

	if (y == 1)
		{
			document.styleSheets[1].cssRules[5].style.left='1'
			document.styleSheets[1].cssRules[6].style.left='30'
			document.styleSheets[1].cssRules[7].style.left='150'
			document.styleSheets[1].cssRules[8].style.left='270'
			document.styleSheets[1].cssRules[14].style.left='390'
			document.styleSheets[1].cssRules[10].style.left='480'
			document.styleSheets[1].cssRules[11].style.left='600'
			document.styleSheets[1].cssRules[12].style.left='720'
			document.styleSheets[1].cssRules[13].style.left='840'

			document.styleSheets[1].cssRules[15].style.left='960'

			document.styleSheets[1].cssRules[10].style.top='362'

			document.getElementById('image6').setAttribute("width", "140");
			document.styleSheets[1].cssRules[5].style.visibility='hidden'

			testmove2 = setTimeout("moviechange4("+yonsa+")", 1);
		}
	else if (y == -1)
		{

			document.styleSheets[1].cssRules[5].style.left='150'
			document.styleSheets[1].cssRules[6].style.left='270'
			document.styleSheets[1].cssRules[7].style.left='390'
			document.styleSheets[1].cssRules[8].style.left='480'
			document.styleSheets[1].cssRules[14].style.left='600'
			document.styleSheets[1].cssRules[10].style.left='720'
			document.styleSheets[1].cssRules[11].style.left='840'
			document.styleSheets[1].cssRules[12].style.left='960'
			document.styleSheets[1].cssRules[13].style.left='1020'

			document.styleSheets[1].cssRules[13].style.visibility='hidden'

			document.styleSheets[1].cssRules[16].style.left='30'

			document.styleSheets[1].cssRules[8].style.top='362'

			document.getElementById('image4').setAttribute("width", "140");


			testmove2 = setTimeout("moviechange4("+yonsa+")", 1);
		}
	}


</script>
</xsl:if>

<xsl:if test="$use-sliding='true'">
<script>
function moviechange4(y)
	{
		var glen = movie.length
		var ending = glen - 1
		var last = ending - 1

		if (yon+y<xsl:value-of select="'&lt;'" disable-output-escaping="yes"/>0)
			{
				yon=ending
			}
		else if (yon+y<xsl:value-of select="'&gt;'" disable-output-escaping="yes"/>ending)
			{
				yon=0
			}
		else
			{
				yon=yon+y
			}


if (searching==0)
	{

		if (searchlist.length == 1)
			{
				document.styleSheets[1].cssRules[5].style.visibility='hidden'
				document.styleSheets[1].cssRules[6].style.visibility='hidden'
				document.styleSheets[1].cssRules[7].style.visibility='hidden'
				document.styleSheets[1].cssRules[8].style.visibility='hidden'
				document.styleSheets[1].cssRules[10].style.visibility='hidden'
				document.styleSheets[1].cssRules[11].style.visibility='hidden'
				document.styleSheets[1].cssRules[12].style.visibility='hidden'
				document.styleSheets[1].cssRules[13].style.visibility='hidden'
				document.styleSheets[1].cssRules[15].style.visibility='hidden'
				document.styleSheets[1].cssRules[16].style.visibility='hidden'
			}
		else if (searchlist.length==2)
			 {
				document.styleSheets[1].cssRules[5].style.visibility='hidden'
				document.styleSheets[1].cssRules[6].style.visibility='hidden'
				document.styleSheets[1].cssRules[7].style.visibility='hidden'
				document.styleSheets[1].cssRules[8].style.visibility='hidden'
				document.styleSheets[1].cssRules[11].style.visibility='hidden'
				document.styleSheets[1].cssRules[12].style.visibility='hidden'
				document.styleSheets[1].cssRules[13].style.visibility='hidden'
				document.styleSheets[1].cssRules[15].style.visibility='hidden'
				document.styleSheets[1].cssRules[16].style.visibility='hidden'
			}

		else if (searchlist.length==3)
			{
				document.styleSheets[1].cssRules[5].style.visibility='hidden'
				document.styleSheets[1].cssRules[6].style.visibility='hidden'
				document.styleSheets[1].cssRules[7].style.visibility='hidden'
				document.styleSheets[1].cssRules[8].style.visibility='hidden'
				document.styleSheets[1].cssRules[12].style.visibility='hidden'
				document.styleSheets[1].cssRules[13].style.visibility='hidden'
				document.styleSheets[1].cssRules[15].style.visibility='hidden'
				document.styleSheets[1].cssRules[16].style.visibility='hidden'
			}
		else if (searchlist.length==4)
			{
				 document.styleSheets[1].cssRules[5].style.visibility='hidden'
				document.styleSheets[1].cssRules[6].style.visibility='hidden'
				document.styleSheets[1].cssRules[7].style.visibility='hidden'
				document.styleSheets[1].cssRules[8].style.visibility='hidden'
				document.styleSheets[1].cssRules[13].style.visibility='hidden'
				document.styleSheets[1].cssRules[15].style.visibility='hidden'
				document.styleSheets[1].cssRules[16].style.visibility='hidden'
			 }
		else if (searchlist.length==5)
			{
				document.styleSheets[1].cssRules[5].style.visibility='hidden'
				document.styleSheets[1].cssRules[6].style.visibility='hidden'
				document.styleSheets[1].cssRules[7].style.visibility='hidden'
				document.styleSheets[1].cssRules[8].style.visibility='hidden'
				document.styleSheets[1].cssRules[15].style.visibility='hidden'
				document.styleSheets[1].cssRules[16].style.visibility='hidden'
			}
		else if (searchlist.length==6)
			{
				document.styleSheets[1].cssRules[5].style.visibility='hidden'
				document.styleSheets[1].cssRules[6].style.visibility='hidden'
				document.styleSheets[1].cssRules[7].style.visibility='hidden'
				document.styleSheets[1].cssRules[15].style.visibility='hidden'
				document.styleSheets[1].cssRules[16].style.visibility='hidden'
			}
		else if (searchlist.length==7)
			{
				document.styleSheets[1].cssRules[5].style.visibility='hidden'
				document.styleSheets[1].cssRules[6].style.visibility='hidden'
				document.styleSheets[1].cssRules[15].style.visibility='hidden'
				document.styleSheets[1].cssRules[16].style.visibility='hidden'
			}
		  else if (searchlist.length==8)
			{
				document.styleSheets[1].cssRules[5].style.visibility='hidden'
				document.styleSheets[1].cssRules[16].style.visibility='hidden'
			}


		

		<xsl:if test="$play-index-files='true'">
			var m56 =searchlist[(yon+ searchlist.length) % searchlist.length]['file'];
		</xsl:if>

		<xsl:if test="$use-titles='true'">
			var title5 = searchlist[(yon+ searchlist.length) % searchlist.length]['title'];
		</xsl:if>

		<xsl:if test="$index1-show-icons = 'true'">
			var videoicons =searchlist[(yon+ searchlist.length) % searchlist.length]['Vicons'];
			var audioicons =searchlist[(yon + searchlist.length) % searchlist.length]['Aicons'];
			var ratingicons =searchlist[(yon + searchlist.length) % searchlist.length]['Ricons'];
			var networkicons =searchlist[(yon + searchlist.length) % searchlist.length]['Sicons'];
		</xsl:if>

		var m1= searchlist[(yon-4+ searchlist.length) % searchlist.length]['basefilename']
		var m2 =searchlist[(yon-3+ searchlist.length) % searchlist.length]['basefilename']
		var m3 =searchlist[(yon-2+ searchlist.length) % searchlist.length]['basefilename']
		var m4= searchlist[(yon-1+ searchlist.length) % searchlist.length]['basefilename']
		var m5 =searchlist[(yon + searchlist.length) % searchlist.length]['basefilename']
		var m6 =searchlist[(yon+1+ searchlist.length) % searchlist.length]['basefilename']
		var m7= searchlist[(yon+2+ searchlist.length) % searchlist.length]['basefilename']
		var m8 =searchlist[(yon+3+ searchlist.length) % searchlist.length]['basefilename']
		var m9 =searchlist[(yon+4+ searchlist.length) % searchlist.length]['basefilename']

		var t1= searchlist[(yon-4+ searchlist.length) % searchlist.length]['thumbnail']
		var t2 =searchlist[(yon-3+ searchlist.length) % searchlist.length]['thumbnail']
		var t3 =searchlist[(yon-2+ searchlist.length) % searchlist.length]['thumbnail']
		var t4= searchlist[(yon-1+ searchlist.length) % searchlist.length]['thumbnail']
		var t5 =searchlist[(yon + searchlist.length) % searchlist.length]['thumbnail']
		var t6 =searchlist[(yon+1+ searchlist.length) % searchlist.length]['thumbnail']
		var t7= searchlist[(yon+2+ searchlist.length) % searchlist.length]['thumbnail']
		var t8 =searchlist[(yon+3+ searchlist.length) % searchlist.length]['thumbnail']
		var t9 =searchlist[(yon+4+ searchlist.length) % searchlist.length]['thumbnail']


		var title1=searchlist[(yon-4+ searchlist.length) % searchlist.length]['title']
		var title2=searchlist[(yon-3+ searchlist.length) % searchlist.length]['title']
		var title3=searchlist[(yon-2+ searchlist.length) % searchlist.length]['title']
		var title4=searchlist[(yon-1+ searchlist.length) % searchlist.length]['title']
		var title5=searchlist[(yon + searchlist.length) % searchlist.length]['title']
		var title6=searchlist[(yon+1+ searchlist.length) % searchlist.length]['title']
		var title7=searchlist[(yon+2+ searchlist.length) % searchlist.length]['title']
		var title8=searchlist[(yon+3+ searchlist.length) % searchlist.length]['title']
		var title9=searchlist[(yon+4+ searchlist.length) % searchlist.length]['title']
		var title10=searchlist[(yon+5+ searchlist.length) % searchlist.length]['title']
	}
else
	{
	
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 8">
		document.styleSheets[1].cssRules[5].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 7">
		document.styleSheets[1].cssRules[6].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 6">
		document.styleSheets[1].cssRules[7].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 5">
		document.styleSheets[1].cssRules[8].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 4">
		document.styleSheets[1].cssRules[10].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 3">
		document.styleSheets[1].cssRules[11].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 2">
		document.styleSheets[1].cssRules[12].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 1">
		document.styleSheets[1].cssRules[13].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 4">
		document.styleSheets[1].cssRules[15].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 8">
		document.styleSheets[1].cssRules[16].style.visibility='visible'
		</xsl:if>
	

		<xsl:if test="$play-index-files='true'">
			var m56 =movie[(yon + movie.length) % movie.length]['file']
		</xsl:if>

		<xsl:if test="$use-titles='true'">
			var title5 = movie[(yon+ movie.length) % movie.length]['title']
		</xsl:if>

		<xsl:if test="$index1-show-icons = 'true'">
			var videoicons =movie[(yon + movie.length) % movie.length]['Vicons'];
			var audioicons =movie[(yon + movie.length) % movie.length]['Aicons'];
			var ratingicons =movie[(yon + movie.length) % movie.length]['Ricons'];
			var networkicons =movie[(yon + movie.length) % movie.length]['Sicons'];
		</xsl:if>

		var m1= movie[(yon-4+ movie.length) % movie.length]['basefilename']
		var m2 =movie[(yon-3+ movie.length) % movie.length]['basefilename']
		var m3 =movie[(yon-2+ movie.length) % movie.length]['basefilename']
		var m4= movie[(yon-1+ movie.length) % movie.length]['basefilename']
		var m5 =movie[(yon + movie.length) % movie.length]['basefilename']
		var m6 =movie[(yon+1+ movie.length) % movie.length]['basefilename']
		var m7= movie[(yon+2+ movie.length) % movie.length]['basefilename']
		var m8 =movie[(yon+3+ movie.length) % movie.length]['basefilename']
		var m9 =movie[(yon+4+ movie.length) % movie.length]['basefilename']

		var t1= movie[(yon-4+ movie.length) % movie.length]['thumbnail']
		var t2 =movie[(yon-3+ movie.length) % movie.length]['thumbnail']
		var t3 =movie[(yon-2+ movie.length) % movie.length]['thumbnail']
		var t4= movie[(yon-1+ movie.length) % movie.length]['thumbnail']
		var t5 =movie[(yon + movie.length) % movie.length]['thumbnail']
		var t6 =movie[(yon+1+ movie.length) % movie.length]['thumbnail']
		var t7= movie[(yon+2+ movie.length) % movie.length]['thumbnail']
		var t8 =movie[(yon+3+ movie.length) % movie.length]['thumbnail']
		var t9 =movie[(yon+4+ movie.length) % movie.length]['thumbnail']

		var title1= movie[(yon-4+ movie.length) % movie.length]['title']
		var title2 =movie[(yon-3+ movie.length) % movie.length]['title']
		var title3 =movie[(yon-2+ movie.length) % movie.length]['title']
		var title4= movie[(yon-1+ movie.length) % movie.length]['title']
		var title5 =movie[(yon + movie.length) % movie.length]['title']
		var title6 =movie[(yon+1+ movie.length) % movie.length]['title']
		var title7= movie[(yon+2+ movie.length) % movie.length]['title']
		var title8 =movie[(yon+3+ movie.length) % movie.length]['title']
		var title9 =movie[(yon+4+ movie.length) % movie.length]['title']
		var title10 =movie[(yon+5+ movie.length) % movie.length]['title']
}




var testthis=movie[(yon + movie.length) % movie.length]['rating']

ratingnow=ratingsys[testthis];

		document.styleSheets[1].cssRules[5].style.left='30'
		document.styleSheets[1].cssRules[6].style.left='150'
		document.styleSheets[1].cssRules[7].style.left='270'
		document.styleSheets[1].cssRules[8].style.left='390'
		document.styleSheets[1].cssRules[9].style.left='480'
		document.styleSheets[1].cssRules[10].style.left='600'
		document.styleSheets[1].cssRules[11].style.left='720'
		document.styleSheets[1].cssRules[12].style.left='840'
		document.styleSheets[1].cssRules[13].style.left='960'

		document.styleSheets[1].cssRules[14].style.visibility='hidden'
		document.styleSheets[1].cssRules[16].style.visibility='hidden'
		document.styleSheets[1].cssRules[15].style.visibility='hidden'
	
		

						
		document.getElementById('image1').setAttribute("src", t1);
		document.getElementById('image2').setAttribute("src", t2);
		document.getElementById('image3').setAttribute("src", t3);
		document.getElementById('image4').setAttribute("src", t4);

		document.getElementById('changeimage').setAttribute("src", t5);

		document.getElementById('image6').setAttribute("src", t6);
		document.getElementById('image7').setAttribute("src", t7);
		document.getElementById('image8').setAttribute("src", t8);
		document.getElementById('image9').setAttribute("src", t9);



var setcheck = m5.toString();

		document.styleSheets[1].cssRules[10].style.top='400'
		document.getElementById('image6').setAttribute("width", "110");
		document.styleSheets[1].cssRules[8].style.top='400'
		document.getElementById('image4').setAttribute("width", "110");

	<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 4">
		if (searching==1)
			{
				document.styleSheets[1].cssRules[13].style.visibility='visible'
			}
	</xsl:if>

	<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 8">
		if (searching==1)
			{
				document.styleSheets[1].cssRules[5].style.visibility='visible'
			}
	</xsl:if>



	<xsl:if test="$use-titles='true'">
		document.getElementById('changetitle').firstChild.nodeValue=title5;
	</xsl:if>

	<xsl:if test="$index1-show-icons = 'true'">
		document.getElementById('videoOutput').setAttribute("src",videoicons);
		document.getElementById('audioCodec').setAttribute("src",audioicons);
		document.getElementById('IndexRatingIcons').setAttribute("src",ratingicons);
		document.getElementById('StudioIcons').setAttribute("src",networkicons);
	</xsl:if>


	<xsl:choose>
		<xsl:when test="library/category[@current='true' and @name ='Set']">
			if (setcheck.substring(0,3) =="Set")
				{
					document.getElementById('changemovie').setAttribute("href","javascript:setParams('"+escape(m5)+".html?0,"+genrecnt.toString()+","+alphaid.toString()+","+flag.toString()+",1,"+escape(dest)+","+yonset.toString()+","+destset+"')");
			
				}
			else
				{
					document.getElementById('changemovie').setAttribute("href","javascript:setParams('"+escape(m5)+".html?"+yon.toString()+","+genrecnt.toString()+","+alphaid.toString()+","+flag.toString()+",1,"+escape(dest)+","+yonset.toString()+","+destset+"')");
					
				}
		</xsl:when>
		<xsl:otherwise>
			if (setcheck.substring(0,3) =="Set")
				{
					if (flag==0)
						{
							var twoItems = excalLeters[(alphaid+ excalLeters.length) % excalLeters.length].split(",")
							document.getElementById('changemovie').setAttribute("href","javascript:setParams('"+escape(m5)+".html?0,"+genrecnt.toString()+","+alphaid.toString()+","+flag.toString()+",2,"+escape(m5)+".html,"+yon.toString()+","+twoItems[1]+"')");
						}

					else

						{
							var genreItems = excalGenre[(genrecnt + excalGenre.length) % excalGenre.length].split(",")
							document.getElementById('changemovie').setAttribute("href","javascript:setParams('"+escape(m5)+".html?0,"+genrecnt.toString()+","+alphaid.toString()+","+flag.toString()+",2,"+escape(m5)+".html,"+yon.toString()+","+genreItems[1]+"')");

						}
				}
			else
				{
					if (flag==0)
						{
					
							var twoItems = excalLeters[(alphaid+ excalLeters.length) % excalLeters.length].split(",")
							document.getElementById('changemovie').setAttribute("href","javascript:setParams('"+escape(m5)+".html?"+yon.toString()+","+genrecnt.toString()+","+alphaid.toString()+","+flag.toString()+",1,"+twoItems[1]+","+yon.toString()+","+twoItems[1]+"')");
				
						}

					else

						{
					
							var genreItems = excalGenre[(genrecnt + excalGenre.length) % excalGenre.length].split(",")
							document.getElementById('changemovie').setAttribute("href","javascript:setParams('"+escape(m5)+".html?"+yon.toString()+","+genrecnt.toString()+","+alphaid.toString()+","+flag.toString()+",1,"+genreItems[1]+","+yon.toString()+","+genreItems[1]+"')");
				
						}
				}
		</xsl:otherwise>
	</xsl:choose>

	<xsl:if test="$play-index-files='true'">
		if (movie[(yon + movie.length) % movie.length]['type']=='playlist')
			{
				document.getElementById('changefile').setAttribute("href",movie[(yon + movie.length) % movie.length]['file']);
			}
		else
			{
				document.getElementById('changefile').setAttribute("href","file:///opt/sybhttpd/localhost.drives/"+movie[(yon + movie.length) % movie.length]['file']);
			}

		document.getElementById('changefile').removeAttribute('vod');
		document.getElementById('changefile').removeAttribute('zcd');

		if (movie[(yon + movie.length) % movie.length]['type']=='zcd')
			{
				var newAttribute = document.createAttribute("zcd");
				newAttribute.nodeValue = "2";
				document.getElementById("changefile").setAttributeNode(newAttribute);
			}
		else if (movie[(yon + movie.length) % movie.length]['type']=='playlist')
			{
				var newAttribute = document.createAttribute("vod");
				newAttribute.nodeValue = "playlist";
				document.getElementById("changefile").setAttributeNode(newAttribute);
			}
		else 
			{
				var newAttribute = document.createAttribute("vod");
				newAttribute.nodeValue = "";
				document.getElementById("changefile").setAttributeNode(newAttribute);
			}

	</xsl:if>

	clearTimeout(switchTime);

	switchTime = setTimeout("changeBG("+yon+")", <xsl:value-of select="$index-scroll-timer"/>);

	testmove = setTimeout("moviechange5("+yon+")", 1);

}
</script>
</xsl:if>

<xsl:if test="$use-sliding !='true'">
<script>

function moviechange(y)

{


	if (list==1)
		{
			var glen = movie.length
			var ending = glen - 1
			var last = ending - 1

			if (yon+y<xsl:value-of select="'&lt;'" disable-output-escaping="yes"/>0)
				{
					yon=ending
				}
			else if (yon+y<xsl:value-of select="'&gt;'" disable-output-escaping="yes"/>ending)
				{
					yon=0
				}
			else
				{
					yon=yon+y
				}
			document.getElementById('list1').firstChild.nodeValue=movie[(yon -4 + movie.length) % movie.length]['title'];
			document.getElementById('list2').firstChild.nodeValue=movie[(yon -3 + movie.length) % movie.length]['title'];
			document.getElementById('list3').firstChild.nodeValue=movie[(yon -2 + movie.length) % movie.length]['title'];
			document.getElementById('list4').firstChild.nodeValue=movie[(yon -1 + movie.length) % movie.length]['title'];
			document.getElementById('list5').firstChild.nodeValue=movie[(yon + movie.length) % movie.length]['title'];
			document.getElementById('list6').firstChild.nodeValue=movie[(yon +1 + movie.length) % movie.length]['title'];
			document.getElementById('list7').firstChild.nodeValue=movie[(yon +2 + movie.length) % movie.length]['title'];
			document.getElementById('list8').firstChild.nodeValue=movie[(yon +3 + movie.length) % movie.length]['title'];
			document.getElementById('list9').firstChild.nodeValue=movie[(yon +4 + movie.length) % movie.length]['title'];
			document.getElementById('list10').firstChild.nodeValue=movie[(yon +5 + movie.length) % movie.length]['title'];

			document.getElementById('listimage').setAttribute('src', movie[(yon + movie.length) % movie.length]['thumbnail']);

			document.getElementById('list5').setAttribute('href', movie[(yon + movie.length) % movie.length]['basefilename']+".html");

		}

	else
		{

		var glen = movie.length
		var ending = glen - 1
		var last = ending - 1

		if (yon+y<xsl:value-of select="'&lt;'" disable-output-escaping="yes"/>0)
			{
				yon=ending
			}
		else if (yon+y<xsl:value-of select="'&gt;'" disable-output-escaping="yes"/>ending)
			{
				yon=0
			}
		else
			{
				yon=yon+y
			}


if (searching==0)
	{

		if (searchlist.length == 1)
			{
				document.styleSheets[1].cssRules[5].style.visibility='hidden'
				document.styleSheets[1].cssRules[6].style.visibility='hidden'
				document.styleSheets[1].cssRules[7].style.visibility='hidden'
				document.styleSheets[1].cssRules[8].style.visibility='hidden'
				document.styleSheets[1].cssRules[10].style.visibility='hidden'
				document.styleSheets[1].cssRules[11].style.visibility='hidden'
				document.styleSheets[1].cssRules[12].style.visibility='hidden'
				document.styleSheets[1].cssRules[13].style.visibility='hidden'
				document.styleSheets[1].cssRules[15].style.visibility='hidden'
				document.styleSheets[1].cssRules[16].style.visibility='hidden'
			}
		else if (searchlist.length==2)
			 {
				document.styleSheets[1].cssRules[5].style.visibility='hidden'
				document.styleSheets[1].cssRules[6].style.visibility='hidden'
				document.styleSheets[1].cssRules[7].style.visibility='hidden'
				document.styleSheets[1].cssRules[8].style.visibility='hidden'
				document.styleSheets[1].cssRules[11].style.visibility='hidden'
				document.styleSheets[1].cssRules[12].style.visibility='hidden'
				document.styleSheets[1].cssRules[13].style.visibility='hidden'
				document.styleSheets[1].cssRules[15].style.visibility='hidden'
				document.styleSheets[1].cssRules[16].style.visibility='hidden'
			}

		else if (searchlist.length==3)
			{
				document.styleSheets[1].cssRules[5].style.visibility='hidden'
				document.styleSheets[1].cssRules[6].style.visibility='hidden'
				document.styleSheets[1].cssRules[7].style.visibility='hidden'
				document.styleSheets[1].cssRules[8].style.visibility='hidden'
				document.styleSheets[1].cssRules[12].style.visibility='hidden'
				document.styleSheets[1].cssRules[13].style.visibility='hidden'
				document.styleSheets[1].cssRules[15].style.visibility='hidden'
				document.styleSheets[1].cssRules[16].style.visibility='hidden'
			}
		else if (searchlist.length==4)
			{
				 document.styleSheets[1].cssRules[5].style.visibility='hidden'
				document.styleSheets[1].cssRules[6].style.visibility='hidden'
				document.styleSheets[1].cssRules[7].style.visibility='hidden'
				document.styleSheets[1].cssRules[8].style.visibility='hidden'
				document.styleSheets[1].cssRules[13].style.visibility='hidden'
				document.styleSheets[1].cssRules[15].style.visibility='hidden'
				document.styleSheets[1].cssRules[16].style.visibility='hidden'
			 }
		else if (searchlist.length==5)
			{
				document.styleSheets[1].cssRules[5].style.visibility='hidden'
				document.styleSheets[1].cssRules[6].style.visibility='hidden'
				document.styleSheets[1].cssRules[7].style.visibility='hidden'
				document.styleSheets[1].cssRules[8].style.visibility='hidden'
				document.styleSheets[1].cssRules[15].style.visibility='hidden'
				document.styleSheets[1].cssRules[16].style.visibility='hidden'
			}
		else if (searchlist.length==6)
			{
				document.styleSheets[1].cssRules[5].style.visibility='hidden'
				document.styleSheets[1].cssRules[6].style.visibility='hidden'
				document.styleSheets[1].cssRules[7].style.visibility='hidden'
				document.styleSheets[1].cssRules[15].style.visibility='hidden'
				document.styleSheets[1].cssRules[16].style.visibility='hidden'
			}
		else if (searchlist.length==7)
			{
				document.styleSheets[1].cssRules[5].style.visibility='hidden'
				document.styleSheets[1].cssRules[6].style.visibility='hidden'
				document.styleSheets[1].cssRules[15].style.visibility='hidden'
				document.styleSheets[1].cssRules[16].style.visibility='hidden'
			}
		  else if (searchlist.length==8)
			{
				document.styleSheets[1].cssRules[5].style.visibility='hidden'
				document.styleSheets[1].cssRules[16].style.visibility='hidden'
			}


		

		<xsl:if test="$play-index-files='true'">
			var m56 =searchlist[(yon+ searchlist.length) % searchlist.length]['file'];
		</xsl:if>

		<xsl:if test="$use-titles='true'">
			var title5 = searchlist[(yon+ searchlist.length) % searchlist.length]['title'];
		</xsl:if>

		<xsl:if test="$index1-show-icons = 'true'">
			var videoicons =searchlist[(yon+ searchlist.length) % searchlist.length]['Vicons'];
			var audioicons =searchlist[(yon + searchlist.length) % searchlist.length]['Aicons'];
			var ratingicons =searchlist[(yon + searchlist.length) % searchlist.length]['Ricons'];
			var networkicons =searchlist[(yon + searchlist.length) % searchlist.length]['Sicons'];
		</xsl:if>

		var m1= searchlist[(yon-4+ searchlist.length) % searchlist.length]['basefilename']
		var m2 =searchlist[(yon-3+ searchlist.length) % searchlist.length]['basefilename']
		var m3 =searchlist[(yon-2+ searchlist.length) % searchlist.length]['basefilename']
		var m4= searchlist[(yon-1+ searchlist.length) % searchlist.length]['basefilename']
		var m5 =searchlist[(yon + searchlist.length) % searchlist.length]['basefilename']
		var m6 =searchlist[(yon+1+ searchlist.length) % searchlist.length]['basefilename']
		var m7= searchlist[(yon+2+ searchlist.length) % searchlist.length]['basefilename']
		var m8 =searchlist[(yon+3+ searchlist.length) % searchlist.length]['basefilename']
		var m9 =searchlist[(yon+4+ searchlist.length) % searchlist.length]['basefilename']

		var t1= searchlist[(yon-4+ searchlist.length) % searchlist.length]['thumbnail']
		var t2 =searchlist[(yon-3+ searchlist.length) % searchlist.length]['thumbnail']
		var t3 =searchlist[(yon-2+ searchlist.length) % searchlist.length]['thumbnail']
		var t4= searchlist[(yon-1+ searchlist.length) % searchlist.length]['thumbnail']
		var t5 =searchlist[(yon + searchlist.length) % searchlist.length]['thumbnail']
		var t6 =searchlist[(yon+1+ searchlist.length) % searchlist.length]['thumbnail']
		var t7= searchlist[(yon+2+ searchlist.length) % searchlist.length]['thumbnail']
		var t8 =searchlist[(yon+3+ searchlist.length) % searchlist.length]['thumbnail']
		var t9 =searchlist[(yon+4+ searchlist.length) % searchlist.length]['thumbnail']


		var title1=searchlist[(yon-4+ searchlist.length) % searchlist.length]['title']
		var title2=searchlist[(yon-3+ searchlist.length) % searchlist.length]['title']
		var title3=searchlist[(yon-2+ searchlist.length) % searchlist.length]['title']
		var title4=searchlist[(yon-1+ searchlist.length) % searchlist.length]['title']
		var title5=searchlist[(yon + searchlist.length) % searchlist.length]['title']
		var title6=searchlist[(yon+1+ searchlist.length) % searchlist.length]['title']
		var title7=searchlist[(yon+2+ searchlist.length) % searchlist.length]['title']
		var title8=searchlist[(yon+3+ searchlist.length) % searchlist.length]['title']
		var title9=searchlist[(yon+4+ searchlist.length) % searchlist.length]['title']
		var title10=searchlist[(yon+5+ searchlist.length) % searchlist.length]['title']
	}
else
	{
	
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 8">
		document.styleSheets[1].cssRules[5].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 7">
		document.styleSheets[1].cssRules[6].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 6">
		document.styleSheets[1].cssRules[7].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 5">
		document.styleSheets[1].cssRules[8].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 4">
		document.styleSheets[1].cssRules[10].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 3">
		document.styleSheets[1].cssRules[11].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 2">
		document.styleSheets[1].cssRules[12].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 1">
		document.styleSheets[1].cssRules[13].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 4">
		document.styleSheets[1].cssRules[15].style.visibility='visible'
		</xsl:if>
		<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 8">
		document.styleSheets[1].cssRules[16].style.visibility='visible'
		</xsl:if>
	

		<xsl:if test="$play-index-files='true'">
			var m56 =movie[(yon + movie.length) % movie.length]['file']
		</xsl:if>

		<xsl:if test="$use-titles='true'">
			var title5 = movie[(yon+ movie.length) % movie.length]['title']
		</xsl:if>

		<xsl:if test="$index1-show-icons = 'true'">
			var videoicons =movie[(yon + movie.length) % movie.length]['Vicons'];
			var audioicons =movie[(yon + movie.length) % movie.length]['Aicons'];
			var ratingicons =movie[(yon + movie.length) % movie.length]['Ricons'];
			var networkicons =movie[(yon + movie.length) % movie.length]['Sicons'];
		</xsl:if>

		var m1= movie[(yon-4+ movie.length) % movie.length]['basefilename']
		var m2 =movie[(yon-3+ movie.length) % movie.length]['basefilename']
		var m3 =movie[(yon-2+ movie.length) % movie.length]['basefilename']
		var m4= movie[(yon-1+ movie.length) % movie.length]['basefilename']
		var m5 =movie[(yon + movie.length) % movie.length]['basefilename']
		var m6 =movie[(yon+1+ movie.length) % movie.length]['basefilename']
		var m7= movie[(yon+2+ movie.length) % movie.length]['basefilename']
		var m8 =movie[(yon+3+ movie.length) % movie.length]['basefilename']
		var m9 =movie[(yon+4+ movie.length) % movie.length]['basefilename']

		var t1= movie[(yon-4+ movie.length) % movie.length]['thumbnail']
		var t2 =movie[(yon-3+ movie.length) % movie.length]['thumbnail']
		var t3 =movie[(yon-2+ movie.length) % movie.length]['thumbnail']
		var t4= movie[(yon-1+ movie.length) % movie.length]['thumbnail']
		var t5 =movie[(yon + movie.length) % movie.length]['thumbnail']
		var t6 =movie[(yon+1+ movie.length) % movie.length]['thumbnail']
		var t7= movie[(yon+2+ movie.length) % movie.length]['thumbnail']
		var t8 =movie[(yon+3+ movie.length) % movie.length]['thumbnail']
		var t9 =movie[(yon+4+ movie.length) % movie.length]['thumbnail']

		var title1= movie[(yon-4+ movie.length) % movie.length]['title']
		var title2 =movie[(yon-3+ movie.length) % movie.length]['title']
		var title3 =movie[(yon-2+ movie.length) % movie.length]['title']
		var title4= movie[(yon-1+ movie.length) % movie.length]['title']
		var title5 =movie[(yon + movie.length) % movie.length]['title']
		var title6 =movie[(yon+1+ movie.length) % movie.length]['title']
		var title7= movie[(yon+2+ movie.length) % movie.length]['title']
		var title8 =movie[(yon+3+ movie.length) % movie.length]['title']
		var title9 =movie[(yon+4+ movie.length) % movie.length]['title']
		var title10 =movie[(yon+5+ movie.length) % movie.length]['title']
}




var testthis=movie[(yon + movie.length) % movie.length]['rating']

ratingnow=ratingsys[testthis];

		document.styleSheets[1].cssRules[5].style.left='30'
		document.styleSheets[1].cssRules[6].style.left='150'
		document.styleSheets[1].cssRules[7].style.left='270'
		document.styleSheets[1].cssRules[8].style.left='390'
		document.styleSheets[1].cssRules[9].style.left='480'
		document.styleSheets[1].cssRules[10].style.left='600'
		document.styleSheets[1].cssRules[11].style.left='720'
		document.styleSheets[1].cssRules[12].style.left='840'
		document.styleSheets[1].cssRules[13].style.left='960'

		document.styleSheets[1].cssRules[14].style.visibility='hidden'
		document.styleSheets[1].cssRules[16].style.visibility='hidden'
		document.styleSheets[1].cssRules[15].style.visibility='hidden'
	
		

						
		document.getElementById('image1').setAttribute("src", t1);
		document.getElementById('image2').setAttribute("src", t2);
		document.getElementById('image3').setAttribute("src", t3);
		document.getElementById('image4').setAttribute("src", t4);

		document.getElementById('changeimage').setAttribute("src", t5);

		document.getElementById('image6').setAttribute("src", t6);
		document.getElementById('image7').setAttribute("src", t7);
		document.getElementById('image8').setAttribute("src", t8);
		document.getElementById('image9').setAttribute("src", t9);



var setcheck = m5.toString();


	<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 4">
		if (searching==1)
			{
				document.styleSheets[1].cssRules[13].style.visibility='visible'
			}
	</xsl:if>

	<xsl:if test="count(library/movies/movie[@isExtra!='true']) > 8">
		if (searching==1)
			{
				document.styleSheets[1].cssRules[5].style.visibility='visible'
			}
	</xsl:if>



	<xsl:if test="$use-titles='true'">
		document.getElementById('changetitle').firstChild.nodeValue=title5;
	</xsl:if>

	<xsl:if test="$index1-show-icons = 'true'">
		document.getElementById('videoOutput').setAttribute("src",videoicons);
		document.getElementById('audioCodec').setAttribute("src",audioicons);
		document.getElementById('IndexRatingIcons').setAttribute("src",ratingicons);
		document.getElementById('StudioIcons').setAttribute("src",networkicons);
	</xsl:if>


	<xsl:choose>
		<xsl:when test="library/category[@current='true' and @name ='Set']">
			if (setcheck.substring(0,3) =="Set")
				{
					document.getElementById('changemovie').setAttribute("href","javascript:setParams('"+escape(m5)+".html?0,"+genrecnt.toString()+","+alphaid.toString()+","+flag.toString()+",1,"+escape(dest)+","+yonset.toString()+","+destset+"')");
			
				}
			else
				{
					document.getElementById('changemovie').setAttribute("href","javascript:setParams('"+escape(m5)+".html?"+yon.toString()+","+genrecnt.toString()+","+alphaid.toString()+","+flag.toString()+",1,"+escape(dest)+","+yonset.toString()+","+destset+"')");
					
				}
		</xsl:when>
		<xsl:otherwise>
			if (setcheck.substring(0,3) =="Set")
				{
					if (flag==0)
						{
							var twoItems = excalLeters[(alphaid+ excalLeters.length) % excalLeters.length].split(",")
							document.getElementById('changemovie').setAttribute("href","javascript:setParams('"+escape(m5)+".html?0,"+genrecnt.toString()+","+alphaid.toString()+","+flag.toString()+",2,"+escape(m5)+".html,"+yon.toString()+","+twoItems[1]+"')");
						}

					else

						{
							var genreItems = excalGenre[(genrecnt + excalGenre.length) % excalGenre.length].split(",")
							document.getElementById('changemovie').setAttribute("href","javascript:setParams('"+escape(m5)+".html?0,"+genrecnt.toString()+","+alphaid.toString()+","+flag.toString()+",2,"+escape(m5)+".html,"+yon.toString()+","+genreItems[1]+"')");

						}
				}
			else
				{
					if (flag==0)
						{
					
							var twoItems = excalLeters[(alphaid+ excalLeters.length) % excalLeters.length].split(",")
							document.getElementById('changemovie').setAttribute("href","javascript:setParams('"+escape(m5)+".html?"+yon.toString()+","+genrecnt.toString()+","+alphaid.toString()+","+flag.toString()+",1,"+twoItems[1]+","+yon.toString()+","+twoItems[1]+"')");
				
						}

					else

						{
					
							var genreItems = excalGenre[(genrecnt + excalGenre.length) % excalGenre.length].split(",")
							document.getElementById('changemovie').setAttribute("href","javascript:setParams('"+escape(m5)+".html?"+yon.toString()+","+genrecnt.toString()+","+alphaid.toString()+","+flag.toString()+",1,"+genreItems[1]+","+yon.toString()+","+genreItems[1]+"')");
				
						}
				}
		</xsl:otherwise>
	</xsl:choose>

	<xsl:if test="$play-index-files='true'">
		if (movie[(yon + movie.length) % movie.length]['type']=='playlist')
			{
				document.getElementById('changefile').setAttribute("href",movie[(yon + movie.length) % movie.length]['file']);
			}
		else
			{
				document.getElementById('changefile').setAttribute("href","file:///opt/sybhttpd/localhost.drives/"+movie[(yon + movie.length) % movie.length]['file']);
			}

		document.getElementById('changefile').removeAttribute('vod');
		document.getElementById('changefile').removeAttribute('zcd');

		if (movie[(yon + movie.length) % movie.length]['type']=='zcd')
			{
				var newAttribute = document.createAttribute("zcd");
				newAttribute.nodeValue = "2";
				document.getElementById("changefile").setAttributeNode(newAttribute);
			}
		else if (movie[(yon + movie.length) % movie.length]['type']=='playlist')
			{
				var newAttribute = document.createAttribute("vod");
				newAttribute.nodeValue = "playlist";
				document.getElementById("changefile").setAttributeNode(newAttribute);
			}
		else 
			{
				var newAttribute = document.createAttribute("vod");
				newAttribute.nodeValue = "";
				document.getElementById("changefile").setAttributeNode(newAttribute);
			}

	</xsl:if>

	clearTimeout(switchTime);

	switchTime = setTimeout("changeBG("+yon+")", <xsl:value-of select="$index-scroll-timer"/>);

	}
}
</script>
</xsl:if>



<xsl:if test="$use-sliding='true'">
<script>
function moviechange5(y)
	{

		yon=y

		var glen = movie.length
		var ending = glen - 1

			if (yon<xsl:value-of select="'&lt;'" disable-output-escaping="yes"/>0)
				{
					yon=ending
				}
			else if (yon<xsl:value-of select="'&gt;'" disable-output-escaping="yes"/>ending)
				{
					yon=0
				}
			else
				{
					yon=yon
				}

			if (searching==0)
				{
					var m5 =searchlist[(yon + searchlist.length) % searchlist.length]['thumbnail']
					var m10 =searchlist[(yon-5+ searchlist.length) % searchlist.length]['thumbnail']
					var m11 =searchlist[(yon+5+ searchlist.length) % searchlist.length]['thumbnail']


				}
			else
				{


					var m5 =movie[(yon + movie.length) % movie.length]['thumbnail']
					var m10 =movie[(yon -5 + movie.length) % movie.length]['thumbnail']
					var m11 =movie[(yon +5 + movie.length) % movie.length]['thumbnail']
				}

		document.getElementById('imagecopy').setAttribute("src",m5);
		document.getElementById('imageleft').setAttribute("src",m10);
		document.getElementById('imageright').setAttribute("src",m11);
		return
	}
</script>
</xsl:if>

<xsl:if test="$use-index-fanart='true'">
	<script>
		function changeBG(y)
			{
				yon=y

				if (searching==0)
					{

						var fans = findSearch( movie, searchlist[(yon + searchlist.length) % searchlist.length])
						var fansearch= movie[fans]['fanart'];

						document.getElementById('imagechange').setAttribute("src",fansearch);
					}
				else
					{
						var m55 =movie[(yon + movie.length) % movie.length]['fanart'];
						document.getElementById('imagechange').setAttribute("src",m55);
					}
			}

	</script>
</xsl:if>



<script>
	function initpage()
		{
			if (flag==0)
				{

					var inittest = findItem( excalLeters, <xsl:choose>
					<xsl:when test="//index[@current='true']/@name = '09'">
						"09,Title_09_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'A'">
						"A,Title_A_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'B'">
						"B,Title_B_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'C'">
						"C,Title_C_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'D'">
						"D,Title_D_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'E'">
						"E,Title_E_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'F'">
						"F,Title_F_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'G'">
						"G,Title_G_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'H'">
						"H,Title_H_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'I'">
						"I,Title_I_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'J'">
						"J,Title_J_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'K'">
						"K,Title_K_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'L'">
						"L,Title_L_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'M'">
						"M,Title_M_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'N'">
						"N,Title_N_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'O'">
						"O,Title_O_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'P'">
						"P,Title_P_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'Q'">
						"Q,Title_Q_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'R'">
						"R,Title_R_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'S'">
						"S,Title_S_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'T'">
						"T,Title_T_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'U'">
						"U,Title_U_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'V'">
						"V,Title_V_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'W'">
						"W,Title_W_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'X'">
						"X,Title_X_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'Y'">
						"Y,Title_Y_1.html"
					</xsl:when>
					<xsl:when test="//index[@current='true']/@name = 'Z'">
						"Z,Title_Z_1.html"
					</xsl:when>
					<xsl:otherwise>"09,Title_09_1.html"</xsl:otherwise></xsl:choose>)

					getParams();
					yon=yon
					alphaid=inittest
				

					var twoItems = excalLeters[(alphaid+ excalLeters.length) % excalLeters.length].split(",")
					
					<xsl:if test="$use-index-fanart='true'">
						var m55 =movie[(yon + movie.length) % movie.length]['fanart'];
						document.getElementById('imagechange').setAttribute("src",m55);
					</xsl:if>
					
					<xsl:if test="$use-titles='true'">
						var title5 = movie[(yon+ movie.length) % movie.length]['title']
					</xsl:if>

					<xsl:if test="$index1-show-icons = 'true'">
						var videoicons =movie[(yon + movie.length) % movie.length]['Vicons'];
						var audioicons =movie[(yon + movie.length) % movie.length]['Aicons'];
						var ratingicons =movie[(yon + movie.length) % movie.length]['Ricons'];
						var networkicons =movie[(yon + movie.length) % movie.length]['Sicons'];
					</xsl:if>
					
					var m1= movie[(yon-4+ movie.length) % movie.length]['basefilename']
					var m2 =movie[(yon-3+ movie.length) % movie.length]['basefilename']
					var m3 =movie[(yon-2+ movie.length) % movie.length]['basefilename']
					var m4= movie[(yon-1+ movie.length) % movie.length]['basefilename']
					var m5 =movie[(yon + movie.length) % movie.length]['basefilename']
					var m6 =movie[(yon+1+ movie.length) % movie.length]['basefilename']
					var m7= movie[(yon+2+ movie.length) % movie.length]['basefilename']
					var m8 =movie[(yon+3+ movie.length) % movie.length]['basefilename']
					var m9 =movie[(yon+4+ movie.length) % movie.length]['basefilename']
					var m10 =movie[(yon-5+ movie.length) % movie.length]['basefilename']
					var m11 =movie[(yon+5+ movie.length) % movie.length]['basefilename']
				
				<xsl:if test="$use-sliding='true'">
					document.getElementById('imagecopy').setAttribute("src",movie[(yon + movie.length) % movie.length]['thumbnail']);

					document.getElementById('imageleft').setAttribute("src",movie[(yon -5+ movie.length) % movie.length]['thumbnail']);
					document.getElementById('imageright').setAttribute("src",movie[(yon +5+ movie.length) % movie.length]['thumbnail']);
				</xsl:if>
						
					document.getElementById('image1').setAttribute("src", movie[(yon-4+ movie.length) % movie.length]['thumbnail']);
					document.getElementById('image2').setAttribute("src", movie[(yon-3+ movie.length) % movie.length]['thumbnail']);
					document.getElementById('image3').setAttribute("src", movie[(yon-2+ movie.length) % movie.length]['thumbnail']);
					document.getElementById('image4').setAttribute("src", movie[(yon-1+ movie.length) % movie.length]['thumbnail']);

					document.getElementById('changeimage').setAttribute("src", movie[(yon + movie.length) % movie.length]['thumbnail']);

					document.getElementById('image6').setAttribute("src", movie[(yon+1+ movie.length) % movie.length]['thumbnail']);
					document.getElementById('image7').setAttribute("src", movie[(yon+2+ movie.length) % movie.length]['thumbnail']);
					document.getElementById('image8').setAttribute("src", movie[(yon+3+ movie.length) % movie.length]['thumbnail']);
					document.getElementById('image9').setAttribute("src", movie[(yon+4+ movie.length) % movie.length]['thumbnail']);

					document.getElementById('list1').firstChild.nodeValue=movie[(yon -4 + movie.length) % movie.length]['title'];
					document.getElementById('list2').firstChild.nodeValue=movie[(yon -3 + movie.length) % movie.length]['title'];
					document.getElementById('list3').firstChild.nodeValue=movie[(yon -2 + movie.length) % movie.length]['title'];
					document.getElementById('list4').firstChild.nodeValue=movie[(yon -1 + movie.length) % movie.length]['title'];
					document.getElementById('list5').firstChild.nodeValue=movie[(yon + movie.length) % movie.length]['title'];
					document.getElementById('list6').firstChild.nodeValue=movie[(yon +1 + movie.length) % movie.length]['title'];
					document.getElementById('list7').firstChild.nodeValue=movie[(yon +2 + movie.length) % movie.length]['title'];
					document.getElementById('list8').firstChild.nodeValue=movie[(yon +3 + movie.length) % movie.length]['title'];
					document.getElementById('list9').firstChild.nodeValue=movie[(yon +4 + movie.length) % movie.length]['title'];
					document.getElementById('list10').firstChild.nodeValue=movie[(yon +5 + movie.length) % movie.length]['title'];

					document.getElementById('listimage').setAttribute('src', movie[(yon + movie.length) % movie.length]['thumbnail']);

					document.getElementById('list5').setAttribute('href', movie[(yon + movie.length) % movie.length]['basefilename']+".html");

					<xsl:if test="$use-titles='true'">
						document.getElementById('changetitle').firstChild.nodeValue=title5;
					</xsl:if>

					<xsl:if test="$index1-show-icons = 'true'">
						document.getElementById('videoOutput').setAttribute("src",videoicons);
						document.getElementById('audioCodec').setAttribute("src",audioicons);
						document.getElementById('IndexRatingIcons').setAttribute("src",ratingicons);
						document.getElementById('StudioIcons').setAttribute("src",networkicons);
					</xsl:if>

					<xsl:choose>
						<xsl:when test="library/category[@current='true' and @name ='Set']">
							document.getElementById('backbutton').setAttribute("href","javascript:setParams('"+destset+"?"+yonset+","+genrecnt+","+alphaid+","+flag+",1,"+escape(m5)+".html,"+yon.toString()+","+escape(dest)+"')");

							document.getElementById('changeimage').setAttribute("src", movie[(yon + movie.length) % movie.length]['thumbnail']);
							document.getElementById('changemovie').setAttribute("href","javascript:setParams('"+escape(m5)+".html?0,"+genrecnt.toString()+","+alphaid.toString()+","+flag.toString()+",1,"+escape(dest)+","+yonset.toString()+","+destset+"')");

						</xsl:when>

						<xsl:otherwise>

							document.getElementById('changeimage').setAttribute("src", movie[(yon + movie.length) % movie.length]['thumbnail']);
							document.getElementById('changemovie').setAttribute("href","javascript:setParams('"+escape(m5)+".html?"+yon.toString()+","+genrecnt.toString()+","+alphaid.toString()+","+flag.toString()+",1,"+twoItems[1]+","+yon.toString()+","+twoItems[1]+"')");
						</xsl:otherwise>
					</xsl:choose>

					

					<xsl:if test="$play-index-files='true'">

						var m56 =movie[(yon + movie.length) % movie.length]['file']
						var m57=movie[(yon + movie.length) % movie.length]['type']

						if (m57=='playlist')
								{
									document.getElementById('changefile').setAttribute("href",m56);
								}
							else
								{
									document.getElementById('changefile').setAttribute("href","file:///opt/sybhttpd/localhost.drives/"+m56);
								}

						document.getElementById('changefile').removeAttribute('vod');
						document.getElementById('changefile').removeAttribute('zcd');

							if (m57=='zcd')
								{
									var newAttribute = document.createAttribute("zcd");
									newAttribute.nodeValue = "2";
									document.getElementById("changefile").setAttributeNode(newAttribute);
									}
							else if (m57=='playlist')
								{
									var newAttribute = document.createAttribute("vod");
									newAttribute.nodeValue = "playlist";
									document.getElementById("changefile").setAttributeNode(newAttribute);
								}
							else 
								{
									var newAttribute = document.createAttribute("vod");
									newAttribute.nodeValue = "";
									document.getElementById("changefile").setAttributeNode(newAttribute);
								}
								  
								
					</xsl:if>
				   	
					document.getElementById('change').firstChild.nodeValue=twoItems[0];
					document.getElementById('change').setAttribute("href",twoItems[1]);
					
				   
	  			}

			else


				{
		
					var inittest = findItem( excalGenre, <xsl:choose><xsl:when test="//index[@current='true']/@name = 'All'">
						"All,Other_All_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name ='HD'">
								"HD,Other_HD_1.html"
								</xsl:when>
							<xsl:when test="//index[@current='true']/@name ='TV Shows'">
								"TV Shows,Other_TV Shows_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'Movies'">
								"Movies,Other_Movies_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name ='Extras'">
								"Extras,Other_Extras_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'New'">
								"New,Other_New_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'Action'">
								"Action,Genres_Action_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'Comedy'">
								"Comedy,Genres_Comedy_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'Animation'">
								"Animation,Genres_Animation_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'Documentary'">
								"Documentary,Genres_Documentary_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'Drama'">
								"Drama,Genres_Drama_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'Fantasy'">
								"Fantasy,Genres_Fantasy_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'Other'">
								"Other,Genres_Other_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'Sci-Fi'">
								"Sci-Fi,Genres_Sci-Fi_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'Thriller'">
								"Thriller,Genres_Thriller_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'Reality-TV'">
								"Reality-TV,Genres_Reality-TV_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'Horror'">
								"Horror,Genres_Horror_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'Family'">
								"Family,Genres_Family_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'Music'">
								"Music,Genres_Music_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'Top250'">
								"Top250,Other_Top250_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'HD-720'">
								"HD-720,Other_HD-720_1.html"
							</xsl:when>
							<xsl:when test="//index[@current='true']/@name = 'HD-1080'">
								"HD-1080,Other_HD-1080_1.html"
							</xsl:when>
							<xsl:otherwise>
								"All,Other_All_1.html"</xsl:otherwise></xsl:choose> )

						getParams();
						yon=yon
						<xsl:choose>
							<xsl:when test="library/category[@current='true' and @name ='Set']">genrecnt=genrecnt</xsl:when>
							<xsl:otherwise>genrecnt=inittest</xsl:otherwise>
						</xsl:choose>


						var genreItems = excalGenre[(genrecnt+ excalGenre.length) % excalGenre.length].split(",")
					
						<xsl:if test="$use-titles='true'">
							var title5 = movie[(yon+ movie.length) % movie.length]['title']
						</xsl:if>

						<xsl:if test="$index1-show-icons = 'true'">
							var videoicons =movie[(yon + movie.length) % movie.length]['Vicons'];
							var audioicons =movie[(yon + movie.length) % movie.length]['Aicons'];
							var ratingicons =movie[(yon + movie.length) % movie.length]['Ricons'];
							var networkicons =movie[(yon + movie.length) % movie.length]['Sicons'];
						</xsl:if>
						var m1= movie[(yon-4+ movie.length) % movie.length]['basefilename']
						var m2 =movie[(yon-3+ movie.length) % movie.length]['basefilename']
						var m3 =movie[(yon-2+ movie.length) % movie.length]['basefilename']
						var m4= movie[(yon-1+ movie.length) % movie.length]['basefilename']
						var m5 =movie[(yon + movie.length) % movie.length]['basefilename']
						var m6 =movie[(yon+1+ movie.length) % movie.length]['basefilename']
						var m7= movie[(yon+2+ movie.length) % movie.length]['basefilename']
						var m8 =movie[(yon+3+ movie.length) % movie.length]['basefilename']
						var m9 =movie[(yon+4+ movie.length) % movie.length]['basefilename']
						var m10 =movie[(yon-5+ movie.length) % movie.length]['basefilename']
						var m11 =movie[(yon+5+ movie.length) % movie.length]['basefilename']
						
					<xsl:if test="$use-sliding='true'">
						document.getElementById('imagecopy').setAttribute("src",movie[(yon + movie.length) % movie.length]['thumbnail']);

						document.getElementById('imageleft').setAttribute("src",movie[(yon -5+ movie.length) % movie.length]['thumbnail']);
						document.getElementById('imageright').setAttribute("src",movie[(yon +5+ movie.length) % movie.length]['thumbnail']);
					</xsl:if>
							
						document.getElementById('image1').setAttribute("src", movie[(yon-4+ movie.length) % movie.length]['thumbnail']);
						document.getElementById('image2').setAttribute("src", movie[(yon-3+ movie.length) % movie.length]['thumbnail']);
						document.getElementById('image3').setAttribute("src", movie[(yon-2+ movie.length) % movie.length]['thumbnail']);
						document.getElementById('image4').setAttribute("src", movie[(yon-1+ movie.length) % movie.length]['thumbnail']);

						

						document.getElementById('image6').setAttribute("src", movie[(yon+1+ movie.length) % movie.length]['thumbnail']);
						document.getElementById('image7').setAttribute("src", movie[(yon+2+ movie.length) % movie.length]['thumbnail']);
						document.getElementById('image8').setAttribute("src", movie[(yon+3+ movie.length) % movie.length]['thumbnail']);
						document.getElementById('image9').setAttribute("src", movie[(yon+4+ movie.length) % movie.length]['thumbnail']);

						document.getElementById('list1').firstChild.nodeValue=movie[(yon -4 + movie.length) % movie.length]['title'];
						document.getElementById('list2').firstChild.nodeValue=movie[(yon -3 + movie.length) % movie.length]['title'];
						document.getElementById('list3').firstChild.nodeValue=movie[(yon -2 + movie.length) % movie.length]['title'];
						document.getElementById('list4').firstChild.nodeValue=movie[(yon -1 + movie.length) % movie.length]['title'];
						document.getElementById('list5').firstChild.nodeValue=movie[(yon + movie.length) % movie.length]['title'];
						document.getElementById('list6').firstChild.nodeValue=movie[(yon +1 + movie.length) % movie.length]['title'];
						document.getElementById('list7').firstChild.nodeValue=movie[(yon +2 + movie.length) % movie.length]['title'];
						document.getElementById('list8').firstChild.nodeValue=movie[(yon +3 + movie.length) % movie.length]['title'];
						document.getElementById('list9').firstChild.nodeValue=movie[(yon +4 + movie.length) % movie.length]['title'];
						document.getElementById('list10').firstChild.nodeValue=movie[(yon +5 + movie.length) % movie.length]['title'];

						document.getElementById('listimage').setAttribute('src', movie[(yon + movie.length) % movie.length]['thumbnail']);

						document.getElementById('list5').setAttribute('href', movie[(yon + movie.length) % movie.length]['basefilename']+".html");

						<xsl:if test="$use-titles='true'">
							document.getElementById('changetitle').firstChild.nodeValue=title5;
						</xsl:if>

						<xsl:if test="$index1-show-icons = 'true'">
							document.getElementById('videoOutput').setAttribute("src",videoicons);
							document.getElementById('audioCodec').setAttribute("src",audioicons);
							document.getElementById('IndexRatingIcons').setAttribute("src",ratingicons);
							document.getElementById('StudioIcons').setAttribute("src",networkicons);
						</xsl:if>

						<xsl:choose>
							<xsl:when test="library/category[@current='true' and @name ='Set']">
								document.getElementById('backbutton').setAttribute("href","javascript:setParams('"+destset+"?"+yonset+","+genrecnt+","+alphaid+","+flag+",1,"+escape(m5)+".html,"+yon.toString()+","+escape(dest)+"')");

								document.getElementById('changeimage').setAttribute("src", movie[(yon + movie.length) % movie.length]['thumbnail']);
								document.getElementById('changemovie').setAttribute("href","javascript:setParams('"+escape(m5)+".html?0,"+genrecnt.toString()+","+alphaid.toString()+","+flag.toString()+",1,"+escape(dest)+","+yonset.toString()+","+destset+"')");
							</xsl:when>
							<xsl:otherwise>
								document.getElementById('changeimage').setAttribute("src", movie[(yon + movie.length) % movie.length]['thumbnail']);
								document.getElementById('changemovie').setAttribute("href","javascript:setParams('"+escape(m5)+".html?"+yon.toString()+","+genrecnt.toString()+","+alphaid.toString()+","+flag.toString()+",1,"+genreItems[1]+","+yon.toString()+","+genreItems[1]+"')");
							</xsl:otherwise>
						</xsl:choose>

						<xsl:if test="$use-index-fanart='true'">
							var m55 =movie[(yon + movie.length) % movie.length]['fanart']
							document.getElementById('imagechange').setAttribute("src",m55);
						</xsl:if>

						<xsl:if test="$play-index-files='true'">

								var m56 =movie[(yon + movie.length) % movie.length]['file']
								var m57=movie[(yon + movie.length) % movie.length]['type']


								if (m57=='playlist')
										{
											document.getElementById('changefile').setAttribute("href",m56);
										}
									else
										{
											document.getElementById('changefile').setAttribute("href","file:///opt/sybhttpd/localhost.drives/"+m56);
										}

								document.getElementById('changefile').removeAttribute('vod');
								document.getElementById('changefile').removeAttribute('zcd');

									if (m57=='zcd')
										{
											var newAttribute = document.createAttribute("zcd");
											newAttribute.nodeValue = "2";
											document.getElementById("changefile").setAttributeNode(newAttribute);
											}
									else if (m57=='playlist')
										{
											var newAttribute = document.createAttribute("vod");
											newAttribute.nodeValue = "playlist";
											document.getElementById("changefile").setAttributeNode(newAttribute);
										}
									else 
										{
											var newAttribute = document.createAttribute("vod");
											newAttribute.nodeValue = "";
											document.getElementById("changefile").setAttributeNode(newAttribute);
										}

										
						</xsl:if>
									document.getElementById('change').firstChild.nodeValue=genreItems[0];
									document.getElementById('change').setAttribute("href",genreItems[1]);
									
					}
							
			}
  </script>

  <!-- ********************************************************Start of navigation scripts used by all indexes***************************************************-->

<script>

	var excalLeters=[ 
		<xsl:for-each select="library/category[@name='Title']/index">"<xsl:value-of select="@name" />,<xsl:value-of select="."/>.html",</xsl:for-each>];

	var excalGenre=[
		<xsl:for-each select="library/category[@name='Other']/index">"<xsl:value-of select="@name" />,<xsl:value-of select="."/>.html",</xsl:for-each>
		<xsl:for-each select="library/category[@name='Genres']/index">"<xsl:value-of select="@name" />,<xsl:value-of select="."/>.html",</xsl:for-each>
       		]
	
		<!-- var excalGenreNew=[<xsl:for-each select="library/category[@name='Other']/index">genre<xsl:value-of select="translate(@name,'-&#x20;','')"/>,</xsl:for-each><xsl:for-each select="library/category[@name='Genres']/index">genre<xsl:value-of select="translate(@name,'-&#x20;','')"/>,</xsl:for-each>] -->

		<!-- var excallettersNew=[<xsl:for-each select="library/category[@name='Title']/index">title<xsl:value-of select="@name" />,</xsl:for-each> ]-->

	<xsl:choose>
		<xsl:when test="//index[@current='true']/@name = '09'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'A'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'B'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'C'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'D'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'E'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'F'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'G'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'H'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'I'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'J'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'K'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'L'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'M'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'N'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'O'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'P'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'Q'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'R'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'S'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'T'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'U'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'V'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'W'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'X'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'Y'">
			var flag = 0;
		</xsl:when>
		<xsl:when test="//index[@current='true']/@name = 'Z'">
			var flag = 0;
		</xsl:when>
		<xsl:otherwise>
			var flag =1;
		</xsl:otherwise>
	</xsl:choose>

function excalLetersMove(x)	//moves the letters left and right 
  	{
		var glen = excalLeters.length
		var ending = glen - 1
		var last = ending - 1

			 if (alphaid+x<xsl:value-of select="'&lt;'" disable-output-escaping="yes"/>0)
				{
					 alphaid=ending
				}
			else if (alphaid+x<xsl:value-of select="'&gt;'" disable-output-escaping="yes"/>ending)
				{
					alphaid=0
				}
			else 
				{
					alphaid=alphaid+x
				}

		var twoItems = excalLeters[(alphaid+ excalLeters.length) % excalLeters.length].split(",")
		document.getElementById('change').firstChild.nodeValue=twoItems[0];
		document.getElementById('change').setAttribute("href",twoItems[1]);
	<!--	sorting=excallettersNew[(alphaid+ excallettersNew.length) % excallettersNew.length] -->
	}

 function excalGenreMove(x)	//moves the genres left and right
  	{
		var glen = excalGenre.length
		var ending = glen - 1
		var last = ending - 1

			 if (genrecnt+x<xsl:value-of select="'&lt;'" disable-output-escaping="yes"/>0)
				{
					genrecnt=ending
				 }
			 else if (genrecnt+x<xsl:value-of select="'&gt;'" disable-output-escaping="yes"/>ending)
				 {
					 genrecnt=0
				 }
			 else 
				 {
					 genrecnt=genrecnt+x;
				 }

			var genreItems = excalGenre[(genrecnt + excalGenre.length) % excalGenre.length].split(",")
			document.getElementById('change').firstChild.nodeValue=genreItems[0];
			document.getElementById('change').setAttribute("href",genreItems[1]);
			<!-- sorting=excalGenreNew[(alphaid+ excalGenreNew.length) % excalGenreNew.length] -->
				
	}

 function excalLoadLetter()	//change the list to letters 
  	{
		flag=0
			{
				alphaid=alphaid
  				var twoItems = excalLeters[(alphaid+ excalLeters.length) % excalLeters.length].split(",")
				document.getElementById('change').firstChild.nodeValue=twoItems[0];
				document.getElementById('change').setAttribute("href",twoItems[1]);
				<!-- sorting=excallettersNew[(alphaid+ excallettersNew.length) % excallettersNew.length] -->

	  		}
		return false
  	}

 function excalLoadGenre()	//change the list to genres 
  	{
		flag=1
	 		{
				genrecnt=genrecnt		
		 		  var genreItems = excalGenre[(genrecnt + excalGenre.length) % excalGenre.length].split(",")
		   
				   document.getElementById('change').firstChild.nodeValue=genreItems[0];
				   document.getElementById('change').setAttribute("href",genreItems[1]);
				  <!-- sorting=excalGenreNew[(alphaid+ excalGenreNew.length) % excalGenreNew.length]-->
	
			 }
		return
  	}

function upDown(x)
	{
		if (flag== 0)
			{
				excalLetersMove(x)
			}
		else
			{
				excalGenreMove(x)
			}
		return false
	}

 function changeformat()
	{
		 if (flag==0) 
			{
				excalLoadGenre()
			}
		 else
			{
				excalLoadLetter()
			}
		}


function findItem( list, item ) {
	var result = -1;

	for( var i = 0; i != list.length; i++ ) {
	  if( list[i] == item ) {
		return i;
		}
	}
	return result;
}


function findSearch( list, item ) {
	var result = -1;

	for( var i = 0; i != list.length; i++ ) {
	  if( list[i]['basefilename'] == item ) {
		return i;
		}
	}
	return result;
}
</script>

<script type="text/javascript">
function togglePopup(x)
	{
		  var temp = document.styleSheets[1].cssRules[(x)].style
		  var tempnew = document.styleSheets[1].cssRules[2].style
		  if ( temp.visibility == 'visible' )
			   {
				temp.visibility = 'hidden'
				tempnew.visibility = 'hidden'
				document.getElementById('navchange').setAttribute("href","#movies4");
			  }
		  else
			   {
				temp.visibility = 'visible'
				tempnew.visibility = 'visible'
				document.getElementById('navchange').setAttribute("href","#middle");
			   }
		  return
	}
</script>

<!--****************************************************************END OF NAVIGATION SCRIPTS*******************************************************************-->


<!--****************************************************************MISC SCRIPTS IN THE WORKS*******************************************************************-->
<script>
function initClock() 
	{
		updateClock();
		setInterval('updateClock();', 1000);
	}
    
function updateClock() 
	{

		var currentTime = new Date()
		var hours = currentTime.getHours()
		var minutes = currentTime.getMinutes()

		var suffix = "AM";
		
		if (hours >= 12) 
			{
				suffix = "PM";
				hours = hours - 12;
			}
		if (hours == 0) 
			{
				hours = 12;
			}

		if (minutes <xsl:value-of select="'&lt;'" disable-output-escaping="yes"/> 10)
			{
				minutes = "0" + minutes
			}
		document.getElementById('time').firstChild.nodeValue = hours + ":" + minutes + " " + suffix
		var myDate = new Date();
		document.getElementById('date').firstChild.nodeValue = myDate.toDateString();
	
	}
</script>

<xsl:if test="$parental-control-on='true'">
<script type="text/javascript">

function prompter() 
{
<xsl:choose>
<xsl:when test="$number-of-children > 1">

if (ratingnow<xsl:value-of select="'&gt;'" disable-output-escaping="yes"/>=<xsl:value-of select="$childs-age-youngest"/>)
{
	if (ratingnow<xsl:value-of select="'&gt;'" disable-output-escaping="yes"/>=<xsl:value-of select="$childs-age-oldest"/>)
		{		
			var reply = prompt("Password?", "")

				if (reply=="<xsl:value-of select="$parental-password-master"/>")
					{
						return
					}
				else 
					{
						alert ( "Sorry,You have entered the wrong password")
						return false
					}
		}
	<xsl:if test="$number-of-children=3">
	else if (ratingnow<xsl:value-of select="'&gt;'" disable-output-escaping="yes"/>=<xsl:value-of select="$childs-age-middle"/>)
		{		
			var reply = prompt("Password?", "")

				if (reply=="<xsl:value-of select="$parental-password-oldest"/>" || reply=="<xsl:value-of select="$parental-password-master"/>")
					{
						return
					}
				else 
					{
						alert ( "Sorry,You have entered the wrong password")
						return false
					}
		}
	</xsl:if>

	else
		{		
			var reply = prompt("Password?", "")

				if (reply=="<xsl:value-of select="$parental-password-middle"/>" || reply=="<xsl:value-of select="$parental-password-oldest"/>" || reply=="<xsl:value-of select="$parental-password-master"/>")
					{
						return
					}
				else 
					{
						alert ( "Sorry,You have entered the wrong password")
						return false
					}
		}
}
</xsl:when>
<xsl:otherwise>
if (ratingnow<xsl:value-of select="'&gt;'" disable-output-escaping="yes"/>=<xsl:value-of select="$childs-age-youngest"/>)
{
	var reply = prompt("What's the Password?", "")

				if (reply=="<xsl:value-of select="$parental-password-master"/>")
					{
						return
					}
				else 
					{
						alert ( "Sorry,You have entered the wrong password")
						return false
					}
		}
}
</xsl:otherwise>
</xsl:choose>
else
{
return
}
}
</script>
</xsl:if>

<script>

function listToggle()
{

	if (list==1)
		{
			document.styleSheets[1].cssRules[4].style.visibility='visible'
			document.styleSheets[1].cssRules[5].style.visibility='visible'
			document.styleSheets[1].cssRules[6].style.visibility='visible'
			document.styleSheets[1].cssRules[7].style.visibility='visible'
			document.styleSheets[1].cssRules[8].style.visibility='visible'
			document.styleSheets[1].cssRules[9].style.visibility='visible'
			document.styleSheets[1].cssRules[10].style.visibility='visible'
			document.styleSheets[1].cssRules[11].style.visibility='visible'
			document.styleSheets[1].cssRules[12].style.visibility='visible'
			document.styleSheets[1].cssRules[13].style.visibility='visible'
			document.styleSheets[1].cssRules[17].style.visibility='visible'
			document.styleSheets[1].cssRules[18].style.visibility='visible'
			document.styleSheets[1].cssRules[19].style.visibility='visible'
			

			document.styleSheets[2].cssRules[0].style.visibility='hidden'
			document.styleSheets[2].cssRules[1].style.visibility='hidden'
			document.styleSheets[2].cssRules[2].style.visibility='hidden'
			document.styleSheets[2].cssRules[3].style.visibility='hidden'
			document.styleSheets[2].cssRules[4].style.visibility='hidden'
			document.styleSheets[2].cssRules[5].style.visibility='hidden'
			document.styleSheets[2].cssRules[6].style.visibility='hidden'
			document.styleSheets[2].cssRules[7].style.visibility='hidden'
			document.styleSheets[2].cssRules[8].style.visibility='hidden'
			document.styleSheets[2].cssRules[9].style.visibility='hidden'
			document.styleSheets[2].cssRules[10].style.visibility='hidden'

			

						document.getElementById('imagecopy').setAttribute("src",movie[(yon + movie.length) % movie.length]['thumbnail']);

						document.getElementById('imageleft').setAttribute("src",movie[(yon -5+ movie.length) % movie.length]['thumbnail']);
						document.getElementById('imageright').setAttribute("src",movie[(yon +5+ movie.length) % movie.length]['thumbnail']);

							
						document.getElementById('image1').setAttribute("src", movie[(yon-4+ movie.length) % movie.length]['thumbnail']);
						document.getElementById('image2').setAttribute("src", movie[(yon-3+ movie.length) % movie.length]['thumbnail']);
						document.getElementById('image3').setAttribute("src", movie[(yon-2+ movie.length) % movie.length]['thumbnail']);
						document.getElementById('image4').setAttribute("src", movie[(yon-1+ movie.length) % movie.length]['thumbnail']);
						document.getElementById('changeimage').setAttribute("src", movie[(yon+ movie.length) % movie.length]['thumbnail']);
						
						document.getElementById('imagechange').setAttribute("src", movie[(yon+ movie.length) % movie.length]['fanart']);
						document.getElementById('image6').setAttribute("src", movie[(yon+1+ movie.length) % movie.length]['thumbnail']);
						document.getElementById('image7').setAttribute("src", movie[(yon+2+ movie.length) % movie.length]['thumbnail']);
						document.getElementById('image8').setAttribute("src", movie[(yon+3+ movie.length) % movie.length]['thumbnail']);
						document.getElementById('image9').setAttribute("src", movie[(yon+4+ movie.length) % movie.length]['thumbnail']);

			document.getElementById('listToggle').setAttribute("href","#movies4");


			list=0;
		}
	else
		{

			document.styleSheets[1].cssRules[4].style.visibility='hidden'
			document.styleSheets[1].cssRules[5].style.visibility='hidden'
			document.styleSheets[1].cssRules[6].style.visibility='hidden'
			document.styleSheets[1].cssRules[7].style.visibility='hidden'
			document.styleSheets[1].cssRules[8].style.visibility='hidden'
			document.styleSheets[1].cssRules[9].style.visibility='hidden'
			document.styleSheets[1].cssRules[10].style.visibility='hidden'
			document.styleSheets[1].cssRules[11].style.visibility='hidden'
			document.styleSheets[1].cssRules[12].style.visibility='hidden'
			document.styleSheets[1].cssRules[13].style.visibility='hidden'
			document.styleSheets[1].cssRules[17].style.visibility='hidden'
			document.styleSheets[1].cssRules[18].style.visibility='hidden'
			document.styleSheets[1].cssRules[19].style.visibility='hidden'
		

			document.styleSheets[2].cssRules[0].style.visibility='visible'
			document.styleSheets[2].cssRules[1].style.visibility='visible'
			document.styleSheets[2].cssRules[2].style.visibility='visible'
			document.styleSheets[2].cssRules[3].style.visibility='visible'
			document.styleSheets[2].cssRules[4].style.visibility='visible'
			document.styleSheets[2].cssRules[5].style.visibility='visible'
			document.styleSheets[2].cssRules[6].style.visibility='visible'
			document.styleSheets[2].cssRules[7].style.visibility='visible'
			document.styleSheets[2].cssRules[8].style.visibility='visible'
			document.styleSheets[2].cssRules[9].style.visibility='visible'
			document.styleSheets[2].cssRules[10].style.visibility='visible'

			document.getElementById('list1').firstChild.nodeValue=movie[(yon -4 + movie.length) % movie.length]['title'];
			document.getElementById('list2').firstChild.nodeValue=movie[(yon -3 + movie.length) % movie.length]['title'];
			document.getElementById('list3').firstChild.nodeValue=movie[(yon -2 + movie.length) % movie.length]['title'];
			document.getElementById('list4').firstChild.nodeValue=movie[(yon -1 + movie.length) % movie.length]['title'];
			document.getElementById('list5').firstChild.nodeValue=movie[(yon + movie.length) % movie.length]['title'];
			document.getElementById('list6').firstChild.nodeValue=movie[(yon +1 + movie.length) % movie.length]['title'];
			document.getElementById('list7').firstChild.nodeValue=movie[(yon +2 + movie.length) % movie.length]['title'];
			document.getElementById('list8').firstChild.nodeValue=movie[(yon +3 + movie.length) % movie.length]['title'];
			document.getElementById('list9').firstChild.nodeValue=movie[(yon +4 + movie.length) % movie.length]['title'];
			document.getElementById('list10').firstChild.nodeValue=movie[(yon +5 + movie.length) % movie.length]['title'];

			document.getElementById('listimage').setAttribute('src', movie[(yon + movie.length) % movie.length]['thumbnail']);

			document.getElementById('list5').setAttribute('href', movie[(yon + movie.length) % movie.length]['basefilename']+".html");

			document.getElementById('listToggle').setAttribute("href","#list5");

			list=1;

		
		}
	return
}
</script>
<!--*************************************END of MISC SCRIPTS*********************************************-->


</xsl:template>

<!--*******************************************************END OF STYLE AND JAVASCRIPT****************************************************-->



<!--*******************************************************START OF HTML******************************************************************-->
  

<xsl:template name="index-1-html">

<xsl:choose>
	<xsl:when test ="$original-bg='true'">
		<xsl:attribute name="background">pictures/bg19.png</xsl:attribute>
	</xsl:when>
	<xsl:otherwise>
		<xsl:attribute name="background">pictures/bg19black.png</xsl:attribute>
	</xsl:otherwise>
</xsl:choose>


<xsl:for-each select="library/category[@name='Title']/index">
	<xsl:choose>
		<xsl:when test="@name = '09'">
			<a href="Title_09_1.html" tvid="1"></a>
		</xsl:when>
		<xsl:when test="@name = 'A'">
			<a href="Title_A_1.html" tvid="2"></a>
		</xsl:when>
		<xsl:when test="@name = 'B'">
			<a href="Title_B_1.html" tvid="22"></a>
		</xsl:when>
		<xsl:when test="@name = 'C'">
			<a href="Title_C_1.html" tvid="222"></a>
		</xsl:when>
		<xsl:when test="@name = 'D'">
			<a href="Title_D_1.html" tvid="3"></a>
		</xsl:when>
		<xsl:when test="@name = 'E'">
			<a href="Title_E_1.html" tvid="33"></a>
		</xsl:when>
		<xsl:when test="@name = 'F'">
			<a href="Title_F_1.html" tvid="333"></a>
		</xsl:when>
		<xsl:when test="@name = 'G'">
			<a href="Title_G_1.html" tvid="4"></a>
		</xsl:when>
		<xsl:when test="@name = 'H'">
			<a href="Title_H_1.html" tvid="44"></a>
		</xsl:when>
		<xsl:when test="@name = 'I'">
			<a href="Title_I_1.html" tvid="444"></a>
		</xsl:when>
		<xsl:when test="@name = 'J'">
			<a href="Title_J_1.html" tvid="5"></a>
		</xsl:when>
		<xsl:when test="@name = 'K'">
			<a href="Title_K_1.html" tvid="55"></a>
		</xsl:when>
		<xsl:when test="@name = 'L'">
			<a href="Title_L_1.html" tvid="555"></a>
		</xsl:when>
		<xsl:when test="@name = 'M'">
			<a href="Title_M_1.html" tvid="6"></a>
		</xsl:when>
		<xsl:when test="@name = 'N'">
			<a href="Title_N_1.html" tvid="66"></a>
		</xsl:when>
		<xsl:when test="@name = 'O'">
			<a href="Title_O_1.html" tvid="666"></a>
		</xsl:when>
		<xsl:when test="@name = 'P'">
			<a href="Title_P_1.html" tvid="7"></a>
		</xsl:when>
		<xsl:when test="@name = 'Q'">
			<a href="Title_Q_1.html" tvid="77"></a>
		</xsl:when>
		<xsl:when test="@name = 'R'">
			<a href="Title_R_1.html" tvid="777"></a>
		</xsl:when>
		<xsl:when test="@name = 'S'">
			<a href="Title_S_1.html" tvid="7777"></a>
		</xsl:when>
		<xsl:when test="@name = 'T'">
			<a href="Title_T_1.html" tvid="8"></a>
		</xsl:when>
		<xsl:when test="@name = 'U'">
			<a href="Title_U_1.html" tvid="88"></a>
		</xsl:when>
		<xsl:when test="@name = 'V'">
			<a href="Title_V_1.html" tvid="888"></a>
		</xsl:when>
		<xsl:when test="@name = 'W'">
			<a href="Title_W_1.html" tvid="9"></a>
		</xsl:when>
		<xsl:when test="@name = 'X'">
			<a href="Title_X_1.html" tvid="99"></a>
		</xsl:when>
		<xsl:when test="@name = 'Y'">
			<a href="Title_Y_1.html" tvid="999"></a>
		</xsl:when>
		<xsl:when test="@name = 'Z'">
			<a href="Title_Z_1.html" tvid="9999"></a>
		</xsl:when>

		<xsl:otherwise>
		<a href="blank" tvid="blank"></a>
		</xsl:otherwise>
		</xsl:choose>
               </xsl:for-each>

<xsl:for-each select="library/category[@name='Other']/index">
	<xsl:choose>
	    <xsl:when test="@name = 'All'">
			<a href="Other_All_1.html" tvid="255"/>
		</xsl:when>
		<xsl:when test="@name = 'HD'">
			<a href="Other_HD_1.html" tvid="43"/>
		</xsl:when>
		<xsl:when test="@name = 'TV Shows'">
			<a href="Other_TV Shows_1.html" tvid="887"/>
		</xsl:when>
		<xsl:when test="@name = 'Movies'">
			<a href="Other_Movies_1.html" tvid="668"/>
		</xsl:when>
		<xsl:when test="@name = 'Extras'">
			<a href="Other_Extras_1.html" tvid="398"/>
		</xsl:when>
		<xsl:when test="@name = 'New'">
			<a href="Other_New_1.html" tvid="639"/>
		</xsl:when>
		<xsl:when test="@name = 'Top250'">
			<a href="Other_Top250_1.html" tvid="807"/>
		</xsl:when>
		<xsl:when test="@name = 'HD-720'">
			<a href="Other_HD-720_1.html" tvid="437"/>
		</xsl:when>
		<xsl:when test="@name = 'HD-1080'">
			<a href="Other_HD-1080_1.html" tvid="431"/>
		</xsl:when>
		<xsl:otherwise>
		<a href="blank" tvid="blank"></a>
		</xsl:otherwise>
	</xsl:choose>	    
</xsl:for-each>

<xsl:for-each select="library/category[@name='Genres']/index">
	<xsl:choose>
	    <xsl:when test="@name = 'Action'">
			<a href="Genres_Action_1.html" tvid="228"/>
		</xsl:when>
		<xsl:when test="@name = 'Animation'">
			<a href="Genres_Animation_1.html" tvid="264"/>
		</xsl:when>
		<xsl:when test="@name = 'Comedy'">
			<a href="Genres_Comedy_1.html" tvid="266"/>
		</xsl:when>
		<xsl:when test="@name = 'Documentary'">
			<a href="Genres_Documentary_1.html" tvid="362"/>
		</xsl:when>
		<xsl:when test="@name = 'Drama'">
			<a href="Genres_Drama_1.html" tvid="372"/>
		</xsl:when>
		<xsl:when test="@name = 'Fantasy'">
			<a href="Genres_Fantasy_1.html" tvid="326"/>
		</xsl:when>
		<xsl:when test="@name = 'Other'">
			<a href="Genres_Other_1.html" tvid="684"/>
		</xsl:when>
		<xsl:when test="@name = 'Sci-Fi'">
			<a href="Genres_Sci-Fi_1.html" tvid="724"/>
		</xsl:when>
		<xsl:when test="@name = 'Thriller'">
			<a href="Genres_Thriller_1.html" tvid="847"/>
		</xsl:when>
		<xsl:when test="@name = 'Reality'">
			<a href="Genres_Reality_1.html" tvid="732"/>
		</xsl:when>
		<xsl:when test="@name = 'Horror'">
			<a href="Genres_Horror_1.html" tvid="467"/>
		</xsl:when>
		<xsl:when test="@name = 'Family'">
			<a href="Genres_Family_1.html" tvid="3264"/>
		</xsl:when>
		<xsl:when test="@name = 'Music'">
			<a href="Genres_Music_1.html" tvid="687"/>
		</xsl:when>
		<xsl:otherwise>
		<a href="blank" tvid="blank"></a>
		</xsl:otherwise>
	</xsl:choose>	    
</xsl:for-each>

<xsl:choose>
	<xsl:when test="//index[@current='true']/@name = 'All'">
		<a tvid="HOME"><xsl:attribute name="href"><xsl:value-of select="$index-home-button"/></xsl:attribute></a>            
	</xsl:when>
	<xsl:otherwise>
		<a tvid="HOME"><xsl:attribute name="href"><xsl:value-of select="$index-home-button-other"/></xsl:attribute></a>
	</xsl:otherwise>
</xsl:choose>


<a href="#" onclick="return togglePopup(1)" id="navchange" tvid="info" />

<xsl:if test="library/category[@current='true' and @name ='Set']">
	<a href="#" id="backbutton" tvid="back"/>
</xsl:if>


<!-- just for reference
<a href="#action" onfocusload="" onfocus="return moviechange(1,action)" id="actionup" name="actionup"/>
<a href="#action" onfocusload="" onfocus="return moviechange(-1,action)" id="actionup" name="actionup"/>
<a href="#action" onfocusload="" onfocus="return moviechange(9,action)" id="actionup" name="actionup"/>
<a href="#action" onfocusload="" onfocus="return moviechange(-9,action)" id="actionup" name="actionup"/>
<a href="#action" onfocusload="" onfocus="return moviechange(1,action)" id="actionlistdown" name="actionlistdown"/>
<a href="#action" onfocusload="" onfocus="return moviechange(-1,action)" id="actionlistup" name="actionlistup"/>
<a href="#action" onkeyupset="actionup" onkeyupset="actiondown" onkeyupset="actionleft" onkeyupset="actionright" id="action" name="action"/>
<a href="#action" onkeyupset="actionlistup" onkeyupset="actionlistdown" onkeyupset="actionlistup" onkeyupset="actionlistdown" id="actionlist" name="actionlist"/>
-->

<a href="#middle" onclick="testing()" tvid="clear"/>
<a href="#list5" id="listToggle" name="listToggle" onclick="listToggle()" TVID="GREEN"/>
<a href="#middle" onfocusload="" onfocus="return changeformat()" onclick="return changeformat()" name="leters" class="sorting2"></a>
<a href="#middle" onfocusload="" onfocus="return upDown(-1)" onclick="return upDown(-1)" name="left" onkeyrightset="middle" id="up"></a>
<a href="#middle" onfocusload="" onfocus="return upDown(1)" onclick="return upDown(1)" name="right" onkeyleftset="middle" id="down"></a>
<a href="#" onclick="excalSearchThis()" id="menutoggle" name="menutoggle"><xsl:attribute name="tvid"><xsl:value-of select="$search-button"/></xsl:attribute></a>


<a href="#movies4" onfocusload="" onfocus="return moviechange(1)" onclick="return moviechange(1)" name="rightn"/>
<a href="#movies4" onfocusload="" onfocus="return moviechange(-1)" onclick="return moviechange(-1)" name="leftn"/>
<a href="#movies4" onfocusload="" onfocus="return moviechange(9)" onclick="return moviechange(9)" name="downn"/>
<a href="#movies4" onfocusload="" onfocus="return moviechange(-9)" onclick="return moviechange(-9)" name="upn"/>
<a href="#movies4" onfocusload="" onfocus="return moviechange(27)" onclick="return moviechange(27)" tvid="pgdn"/>
<a href="#movies4" onfocusload="" onfocus="return moviechange(-27)" onclick="return moviechange(-27)" tvid="pgup"/>

<a href="#list5" onfocusload="" onfocus="return moviechange(1)" onclick="return moviechange(1)" name="listdown"/>
<a href="#list5" onfocusload="" onfocus="return moviechange(-1)" onclick="return moviechange(-1)" name="listup"/>


<xsl:if test="$play-index-files='true'">
	<a>
		<xsl:attribute name="href"><xsl:value-of select="library/movies/movie[position()=1]/files/file/fileURL"/></xsl:attribute>
		<xsl:attribute name="id">changefile</xsl:attribute>
		<xsl:attribute name="tvid">play</xsl:attribute>
	 <xsl:choose>
			<xsl:when test="//movie/container='DVD Video' or //movie/container='dvd video'">
				<xsl:attribute name="zcd">2</xsl:attribute>
			</xsl:when>
			<xsl:when test="//movie/container='ISO' or //movie/container='iso'">
				<xsl:attribute name="zcd">2</xsl:attribute>
			</xsl:when>
			<xsl:when test="//movie/container='IMG' or //movie/container='img'">	
				<xsl:attribute name="zcd">2</xsl:attribute>
			</xsl:when>
			<xsl:when test="substring(files/file[1]/fileURL,string-length(files/file[1]/fileURL)-7,8) = 'VIDEO_TS'">
				<xsl:attribute name="zcd">2</xsl:attribute> 
			</xsl:when>
			<xsl:when test="//movie/container='vob' or //movie/container='VOB' and $nomenus='true'">
				<xsl:attribute name="vod"/> 
			</xsl:when>
			<xsl:when test="//movie/container='vob' or //movie/container='VOB'">
				<xsl:attribute name="zcd">2</xsl:attribute> 
			</xsl:when>
			<xsl:when test="//movie/container= 'MDF' or //movie/container='mdf'">
				<xsl:attribute name="zcd">2</xsl:attribute>
			</xsl:when>
			<xsl:when test="//movie/container= 'NRG' or //movie/container='nrg'">
				<xsl:attribute name="zcd">2</xsl:attribute>
			</xsl:when>
			<xsl:when test="//movie/container= 'BIN' or //movie/container='bin'">
				<xsl:attribute name="zcd">2</xsl:attribute>
			</xsl:when>
			<xsl:otherwise>
				<xsl:attribute name="vod"/>
			</xsl:otherwise>
			</xsl:choose> 
	 </a>
</xsl:if>


<table width="1100" height="656" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td>

			<xsl:if test="$use-index-fanart='true'">
			<div id="imagebkgd">
				<img>
				 <xsl:attribute name="src"><xsl:value-of select="library/movies/movie[position()=1]/fanartFile"/></xsl:attribute>
				 <xsl:attribute name="width">1000</xsl:attribute>
				 <xsl:attribute name="id">imagechange</xsl:attribute>
				 </img>
			</div>
			<div id="frames">
				<img src="pictures/fanartframe4.png" width="1002"/>
			</div>
			</xsl:if>

			<div id="coverbkgnd">
				<img src="pictures/coverbkgnd.png"/>
			</div>
			<xsl:if test="$use-sliding='true'">	
			<div id="coverframe">
				<img src="pictures/indexcoveroverlay2.png"/>
			</div>
			</xsl:if>

			<xsl:if test="$use-sliding='true'">
				<img>
				 <xsl:attribute name="src"><xsl:value-of select="library/movies/movie[position()=1]/thumbnail"/></xsl:attribute>
				 <xsl:attribute name="width">110</xsl:attribute>
				 <xsl:attribute name="id">imagecopy</xsl:attribute>
				</img>


				<img>
				 <xsl:attribute name="src"><xsl:value-of select="library/movies/movie[position()=1]/thumbnail"/></xsl:attribute>
				 <xsl:attribute name="width">110</xsl:attribute>
				 <xsl:attribute name="id">imageleft</xsl:attribute>
				</img>
			</xsl:if>

			<div id="one">
				
				<img>
				 <xsl:attribute name="src"><xsl:value-of select="library/movies/movie[position()=1]/thumbnail"/></xsl:attribute>
				 <xsl:attribute name="width">110</xsl:attribute>
				 <xsl:attribute name="id">image1</xsl:attribute>
				</img>
				
			</div>
			<div id="two">
				<img>
				 <xsl:attribute name="src"><xsl:value-of select="library/movies/movie[position()=1]/thumbnail"/></xsl:attribute>
				 <xsl:attribute name="width">110</xsl:attribute>
				 <xsl:attribute name="id">image2</xsl:attribute>
				</img>
			</div>
			<div id="three">
				<img>
				 <xsl:attribute name="src"><xsl:value-of select="library/movies/movie[position()=1]/thumbnail"/></xsl:attribute>
				 <xsl:attribute name="width">110</xsl:attribute>
				 <xsl:attribute name="id">image3</xsl:attribute>
				</img>
			</div>
			<div id="four">
				<img>
				 <xsl:attribute name="src"><xsl:value-of select="library/movies/movie[position()=1]/thumbnail"/></xsl:attribute>
				 <xsl:attribute name="width">110</xsl:attribute>
				 <xsl:attribute name="id">image4</xsl:attribute>
				</img>
			</div>

			<xsl:if test="$use-sliding='true'">
				<img>
				 <xsl:attribute name="src"><xsl:value-of select="library/movies/movie[position()=5]/thumbnail"/></xsl:attribute>
				 <xsl:attribute name="width">110</xsl:attribute>
				 <xsl:attribute name="id">imageright</xsl:attribute>
				</img>
			</xsl:if>

			<div id="nine">
				<img>
				 <xsl:attribute name="src"><xsl:value-of select="library/movies/movie[position()=5]/thumbnail"/></xsl:attribute>
				 <xsl:attribute name="width">110</xsl:attribute>
				 <xsl:attribute name="id">image9</xsl:attribute>
				</img>
			</div>
			<div id="eight">
				<img>
				 <xsl:attribute name="src"><xsl:value-of select="library/movies/movie[position()=4]/thumbnail"/></xsl:attribute>
				 <xsl:attribute name="width">110</xsl:attribute>
				 <xsl:attribute name="id">image8</xsl:attribute>
				</img>
				
			</div>
			<div id="seven">
				<img>
				 <xsl:attribute name="src"><xsl:value-of select="library/movies/movie[position()=3]/thumbnail"/></xsl:attribute>
				 <xsl:attribute name="width">110</xsl:attribute>
				 <xsl:attribute name="id">image7</xsl:attribute>
				</img>
			</div>
			<div id="six">
				<img>
				 <xsl:attribute name="src"><xsl:value-of select="library/movies/movie[position()=2]/thumbnail"/></xsl:attribute>
				 <xsl:attribute name="width">110</xsl:attribute>
				 <xsl:attribute name="id">image6</xsl:attribute>
				</img>
			</div>
			<div id="coverbkgnd2"><img src="pictures/middlecoverbkgnd.jpg"/></div>
			<div id="five">
				<a>
				 <xsl:attribute name="href"><xsl:value-of select="library/movies/movie[position()=1]/details"/></xsl:attribute>
				 <xsl:attribute name="id">changemovie</xsl:attribute>
				 <xsl:attribute name="name">movies4</xsl:attribute>
				 <xsl:attribute name="onkeyupset">upn</xsl:attribute>
				 <xsl:attribute name="onkeydownset">downn</xsl:attribute>
				 <xsl:attribute name="onkeyleftset">leftn</xsl:attribute>
				 <xsl:attribute name="onkeyrightset">rightn</xsl:attribute>
				 <xsl:if test="$parental-control-on='true'">
					<xsl:attribute name="onclick">return prompter()</xsl:attribute>
				</xsl:if>
				<img>
				 <xsl:attribute name="src"><xsl:value-of select="library/movies/movie[position()=1]/thumbnail"/></xsl:attribute>
				 <xsl:attribute name="width">140</xsl:attribute>
				 <xsl:attribute name="id">changeimage</xsl:attribute>
				 <xsl:attribute name="onkeyupset">upn</xsl:attribute>
				 <xsl:attribute name="onkeydownset">downn</xsl:attribute>
				 <xsl:attribute name="onkeyleftset">leftn</xsl:attribute>
				 <xsl:attribute name="onkeyrightset">rightn</xsl:attribute>
				 <xsl:attribute name="onfocussrc">pictures/indexmaincoveroverlay.png</xsl:attribute>
				</img>
				</a>
			</div>

		<!-- LIST ITEMS-->
			<div id="list1" name="list1"  class="moviedetails3">Avatar</div>
			<div id="list2" name="list2"  class="moviedetails3">Avatar</div>
			<div id="list3" name="list3" class="moviedetails3">Avatar</div>
			<div id="list4" name="list4" class="moviedetails3">Avatar</div>
			<a href="#list5" id="list5" name="list5" onkeyupset="listup" onkeydownset="listdown" class="moviedetails3">Avatar</a>
			<div id="list6" name="list6" class="moviedetails3">Avatar</div>
			<div id="list7" name="list7" class="moviedetails3">Avatar</div>
			<div id="list8" name="list8" class="moviedetails3">Avatar</div>
			<div id="list9" name="list9" class="moviedetails3">Avatar</div>
			<div id="list10" name="list10" class="moviedetails3">Avatar</div>

			<img src="#" id="listimage" name="listimage" width="200"/>
		<!--END OF LIST ITEMS-->

			<div id="navimage">
				<img src="pictures/navbar2.png"/>
			</div>
<table border="0">
		<tr>
			<td  colspan="5" height="155" width="1000"></td>
		</tr>
		<tr>
			
			<td colspan="5" id="navlinks" align="center" valign="center" height="50">
				<a href="Other_All_1.html" class="mainsorting" name="middle" onkeyupset="leters" onkeydownset="leters" onkeyleftset="left" onkeyrightset="right" id="change">All</a>
			</td>
		</tr>				
	<xsl:if test="$use-titles='true' or $index1-show-icons='true'">
		<tr>
		<xsl:choose>
			<xsl:when test ="$original-bg='true'">
				<xsl:if test ="$index1-show-icons='true' and $use-titles='true'">
					<td  height="850" width="150" align="center" class="moviedetails3" id="Studio"><img id="StudioIcons" src="pictures/studios/warner.png" align="center" height="30" /></td>
					<td  height="850" width="150" align="center" class="moviedetails3" id="rating"><img id="IndexRatingIcons" src="pictures/certificates/R.png" align="center" height="30"/></td>
					<td height="850" align="center" class="movieTitle" id="changetitle">
						<xsl:value-of select="library/movies/movie[position()=1]/title"/><xsl:if test="library/movies/movie[position()=1]/season &gt; 0"> - Season <xsl:value-of select="library/movies/movie[position()=1]/season" /></xsl:if>
					</td>
					<td  height="850" width="150" align="center" class="moviedetails3" id="IconVideo"><img id="videoOutput" src="pictures/t-1080p.png" align="center" height="30" /></td>
					<td  height="850" width="150" align="center" class="moviedetails3" id="audioOutput"><img id="audioCodec" src="pictures/t-dts.png"  align="center" height="30" /></td>
				</xsl:if>
				<xsl:if test ="$index1-show-icons='true' and $use-titles='false'">
					<td  height="850"  align="center" class="moviedetails3" id="Studio"><img id="StudioIcons" src="pictures/studios/warner.png" align="center" height="30" /></td>
					<td  height="850"  align="center" class="moviedetails3" id="rating"><img id="IndexRatingIcons" src="pictures/certificates/R.png" align="center" height="30"/></td>
					<td  height="850"  align="center" class="moviedetails3" id="IconVideo"><img id="videoOutput" src="pictures/t-1080p.png" align="center" height="30" /></td>
					<td  height="850"  align="center" class="moviedetails3" id="audioOutput"><img id="audioCodec" src="pictures/t-dts.png"  align="center" height="30" /></td>
				</xsl:if>
					<xsl:if test ="$index1-show-icons='false' and $use-titles='true'">
						<td height="850" align="center" class="movieTitle" id="changetitle">
						<xsl:value-of select="library/movies/movie[position()=1]/title"/><xsl:if test="library/movies/movie[position()=1]/season &gt; 0"> - Season <xsl:value-of select="library/movies/movie[position()=1]/season" /></xsl:if>
					</td>
				</xsl:if>
			</xsl:when>
			<xsl:otherwise>
				<xsl:if test ="$index1-show-icons='true' and $use-titles='true'">
					<td  height="850" width="150" align="center" class="moviedetails3" id="Studio"><img id="StudioIcons" src="pictures/studios/warner.png" align="center" height="30" /></td>
					<td  height="850" width="150" align="center" class="moviedetails3" id="rating"><img id="IndexRatingIcons" src="pictures/certificates/R.png" align="center" height="30"/></td>
					<td height="850" align="center" class="movieTitleblack" id="changetitle">
						<xsl:value-of select="library/movies/movie[position()=1]/title"/><xsl:if test="library/movies/movie[position()=1]/season &gt; 0"> - Season <xsl:value-of select="library/movies/movie[position()=1]/season" /></xsl:if>
					</td>
					<td  height="850" width="150" align="center" class="moviedetails3" id="IconVideo"><img id="videoOutput" src="pictures/t-1080p.png" align="center" height="30" /></td>
					<td  height="850" width="150" align="center" class="moviedetails3" id="audioOutput"><img id="audioCodec" src="pictures/t-dts.png"  align="center" height="30" /></td>
				</xsl:if>
				<xsl:if test ="$index1-show-icons='true' and $use-titles='false'">
					<td  height="850"  align="center" class="moviedetails3" id="Studio"><img id="StudioIcons" src="pictures/studios/warner.png" align="center" height="30" /></td>
					<td  height="850"  align="center" class="moviedetails3" id="rating"><img id="IndexRatingIcons" src="pictures/certificates/R.png" align="center" height="30"/></td>
					<td  height="850"  align="center" class="moviedetails3" id="IconVideo"><img id="videoOutput" src="pictures/t-1080p.png" align="center" height="30" /></td>
					<td  height="850"  align="center" class="moviedetails3" id="audioOutput"><img id="audioCodec" src="pictures/t-dts.png"  align="center" height="30" /></td>
				</xsl:if>
				<xsl:if test ="$index1-show-icons='false' and $use-titles='true'">
					<td height="850" align="center" class="movieTitleblack" id="changetitle">
						<xsl:value-of select="library/movies/movie[position()=1]/title"/><xsl:if test="library/movies/movie[position()=1]/season &gt; 0"> - Season <xsl:value-of select="library/movies/movie[position()=1]/season" /></xsl:if>
					</td>
				
				</xsl:if>
			</xsl:otherwise>
		</xsl:choose>
		</tr>
	</xsl:if>			
		
		</table>
	</td>
	</tr>
</table>


</xsl:template>
</xsl:stylesheet>